New upstream version 2.14.1
Jakob Haufe
1 year, 10 months ago
0 | /i3lock | |
1 | *.o | |
2 | tags | |
3 | *.swp | |
4 | ||
5 | # We recommend building in a subdirectory called build. | |
6 | # If you chose a different directory name, | |
7 | # it is up to you to arrange for it to be ignored by git, | |
8 | # e.g. by listing your directory in .git/info/exclude. | |
9 | /build |
0 | 2022-06-21 i3lock 2.14.1 | |
1 | ||
2 | • unlock indicator: display only caps lock and num lock, | |
3 | not all modifiers like shift (which can leak information | |
4 | about your password to bystanders) | |
5 | ||
6 | 2022-05-28 i3lock 2.14 | |
7 | ||
8 | • Change default background color to #a3a3a3 | |
9 | See https://github.com/i3/i3lock/pull/300 for extensive | |
10 | discussion and rationale for this change. | |
11 | • Recommend using xss-lock to start i3lock in the README | |
12 | and i3lock.1 man page. xss-lock is the best way to ensure | |
13 | your screen truly is locked before your computer suspends. | |
14 | • Display modifier key warning before unlocking, too, | |
15 | not just on failed attempts like before. | |
16 | • Switch build system from autotools to meson. | |
17 | ||
0 | 18 | 2020-10-27 i3lock 2.13 |
1 | 19 | |
2 | 20 | • Throw error when trying to start on Wayland |
0 | @CODE_COVERAGE_RULES@ | |
1 | ||
2 | echo-version: | |
3 | @echo "@I3LOCK_VERSION@" | |
4 | ||
5 | bin_PROGRAMS = i3lock | |
6 | ||
7 | dist_man1_MANS = i3lock.1 | |
8 | ||
9 | pamddir = $(sysconfdir)/pam.d | |
10 | pamd_files = pam/i3lock | |
11 | pamd_DATA = $(pamd_files) | |
12 | ||
13 | AM_CPPFLAGS = \ | |
14 | @AX_EXTEND_SRCDIR_CPPFLAGS@ | |
15 | ||
16 | i3lock_CFLAGS = \ | |
17 | $(AM_CFLAGS) \ | |
18 | $(XCB_CFLAGS) \ | |
19 | $(XCB_IMAGE_CFLAGS) \ | |
20 | $(XCB_UTIL_CFLAGS) \ | |
21 | $(XCB_UTIL_XRM_CFLAGS) \ | |
22 | $(XKBCOMMON_CFLAGS) \ | |
23 | $(CAIRO_CFLAGS) \ | |
24 | $(CODE_COVERAGE_CFLAGS) | |
25 | ||
26 | i3lock_CPPFLAGS = \ | |
27 | $(AM_CPPFLAGS) \ | |
28 | $(CODE_COVERAGE_CPPFLAGS) | |
29 | ||
30 | i3lock_LDADD = \ | |
31 | $(XCB_LIBS) \ | |
32 | $(XCB_IMAGE_LIBS) \ | |
33 | $(XCB_UTIL_LIBS) \ | |
34 | $(XCB_UTIL_XRM_LIBS) \ | |
35 | $(XKBCOMMON_LIBS) \ | |
36 | $(CAIRO_LIBS) \ | |
37 | $(CODE_COVERAGE_LDFLAGS) | |
38 | ||
39 | i3lock_SOURCES = \ | |
40 | cursors.h \ | |
41 | dpi.c \ | |
42 | dpi.h \ | |
43 | i3lock.c \ | |
44 | i3lock.h \ | |
45 | randr.c \ | |
46 | randr.h \ | |
47 | unlock_indicator.c \ | |
48 | unlock_indicator.h \ | |
49 | xcb.c \ | |
50 | xcb.h | |
51 | ||
52 | EXTRA_DIST = \ | |
53 | $(pamd_files) \ | |
54 | CHANGELOG \ | |
55 | LICENSE \ | |
56 | README.md \ | |
57 | I3LOCK_VERSION |
0 | # Makefile.in generated by automake 1.16.2 from Makefile.am. | |
1 | # @configure_input@ | |
2 | ||
3 | # Copyright (C) 1994-2020 Free Software Foundation, Inc. | |
4 | ||
5 | # This Makefile.in is free software; the Free Software Foundation | |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
8 | ||
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
13 | ||
14 | @SET_MAKE@ | |
15 | ||
16 | ||
17 | VPATH = @srcdir@ | |
18 | am__is_gnu_make = { \ | |
19 | if test -z '$(MAKELEVEL)'; then \ | |
20 | false; \ | |
21 | elif test -n '$(MAKE_HOST)'; then \ | |
22 | true; \ | |
23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ | |
24 | true; \ | |
25 | else \ | |
26 | false; \ | |
27 | fi; \ | |
28 | } | |
29 | am__make_running_with_option = \ | |
30 | case $${target_option-} in \ | |
31 | ?) ;; \ | |
32 | *) echo "am__make_running_with_option: internal error: invalid" \ | |
33 | "target option '$${target_option-}' specified" >&2; \ | |
34 | exit 1;; \ | |
35 | esac; \ | |
36 | has_opt=no; \ | |
37 | sane_makeflags=$$MAKEFLAGS; \ | |
38 | if $(am__is_gnu_make); then \ | |
39 | sane_makeflags=$$MFLAGS; \ | |
40 | else \ | |
41 | case $$MAKEFLAGS in \ | |
42 | *\\[\ \ ]*) \ | |
43 | bs=\\; \ | |
44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | |
45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ | |
46 | esac; \ | |
47 | fi; \ | |
48 | skip_next=no; \ | |
49 | strip_trailopt () \ | |
50 | { \ | |
51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ | |
52 | }; \ | |
53 | for flg in $$sane_makeflags; do \ | |
54 | test $$skip_next = yes && { skip_next=no; continue; }; \ | |
55 | case $$flg in \ | |
56 | *=*|--*) continue;; \ | |
57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ | |
58 | -*I?*) strip_trailopt 'I';; \ | |
59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ | |
60 | -*O?*) strip_trailopt 'O';; \ | |
61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ | |
62 | -*l?*) strip_trailopt 'l';; \ | |
63 | -[dEDm]) skip_next=yes;; \ | |
64 | -[JT]) skip_next=yes;; \ | |
65 | esac; \ | |
66 | case $$flg in \ | |
67 | *$$target_option*) has_opt=yes; break;; \ | |
68 | esac; \ | |
69 | done; \ | |
70 | test $$has_opt = yes | |
71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) | |
72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) | |
73 | pkgdatadir = $(datadir)/@PACKAGE@ | |
74 | pkgincludedir = $(includedir)/@PACKAGE@ | |
75 | pkglibdir = $(libdir)/@PACKAGE@ | |
76 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | |
77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | |
78 | install_sh_DATA = $(install_sh) -c -m 644 | |
79 | install_sh_PROGRAM = $(install_sh) -c | |
80 | install_sh_SCRIPT = $(install_sh) -c | |
81 | INSTALL_HEADER = $(INSTALL_DATA) | |
82 | transform = $(program_transform_name) | |
83 | NORMAL_INSTALL = : | |
84 | PRE_INSTALL = : | |
85 | POST_INSTALL = : | |
86 | NORMAL_UNINSTALL = : | |
87 | PRE_UNINSTALL = : | |
88 | POST_UNINSTALL = : | |
89 | build_triplet = @build@ | |
90 | host_triplet = @host@ | |
91 | target_triplet = @target@ | |
92 | bin_PROGRAMS = i3lock$(EXEEXT) | |
93 | subdir = . | |
94 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
95 | am__aclocal_m4_deps = $(top_srcdir)/m4/ax_append_flag.m4 \ | |
96 | $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ | |
97 | $(top_srcdir)/m4/ax_check_compile_flag.m4 \ | |
98 | $(top_srcdir)/m4/ax_check_enable_debug.m4 \ | |
99 | $(top_srcdir)/m4/ax_check_gnu_make.m4 \ | |
100 | $(top_srcdir)/m4/ax_check_link_flag.m4 \ | |
101 | $(top_srcdir)/m4/ax_code_coverage.m4 \ | |
102 | $(top_srcdir)/m4/ax_configure_args.m4 \ | |
103 | $(top_srcdir)/m4/ax_enable_builddir.m4 \ | |
104 | $(top_srcdir)/m4/ax_extend_srcdir.m4 \ | |
105 | $(top_srcdir)/m4/ax_require_defined.m4 \ | |
106 | $(top_srcdir)/m4/ax_sanitizers.m4 $(top_srcdir)/configure.ac | |
107 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | |
108 | $(ACLOCAL_M4) | |
109 | DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ | |
110 | $(am__configure_deps) $(am__DIST_COMMON) | |
111 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | |
112 | configure.lineno config.status.lineno | |
113 | mkinstalldirs = $(install_sh) -d | |
114 | CONFIG_HEADER = config.h | |
115 | CONFIG_CLEAN_FILES = | |
116 | CONFIG_CLEAN_VPATH_FILES = | |
117 | am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ | |
118 | "$(DESTDIR)$(pamddir)" | |
119 | PROGRAMS = $(bin_PROGRAMS) | |
120 | am_i3lock_OBJECTS = i3lock-dpi.$(OBJEXT) i3lock-i3lock.$(OBJEXT) \ | |
121 | i3lock-randr.$(OBJEXT) i3lock-unlock_indicator.$(OBJEXT) \ | |
122 | i3lock-xcb.$(OBJEXT) | |
123 | i3lock_OBJECTS = $(am_i3lock_OBJECTS) | |
124 | am__DEPENDENCIES_1 = | |
125 | i3lock_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ | |
126 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ | |
127 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ | |
128 | $(am__DEPENDENCIES_1) | |
129 | i3lock_LINK = $(CCLD) $(i3lock_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | |
130 | $(LDFLAGS) -o $@ | |
131 | AM_V_P = $(am__v_P_@AM_V@) | |
132 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) | |
133 | am__v_P_0 = false | |
134 | am__v_P_1 = : | |
135 | AM_V_GEN = $(am__v_GEN_@AM_V@) | |
136 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) | |
137 | am__v_GEN_0 = @echo " GEN " $@; | |
138 | am__v_GEN_1 = | |
139 | AM_V_at = $(am__v_at_@AM_V@) | |
140 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) | |
141 | am__v_at_0 = @ | |
142 | am__v_at_1 = | |
143 | DEFAULT_INCLUDES = -I.@am__isrc@ | |
144 | depcomp = $(SHELL) $(top_srcdir)/depcomp | |
145 | am__maybe_remake_depfiles = depfiles | |
146 | am__depfiles_remade = ./$(DEPDIR)/i3lock-dpi.Po \ | |
147 | ./$(DEPDIR)/i3lock-i3lock.Po ./$(DEPDIR)/i3lock-randr.Po \ | |
148 | ./$(DEPDIR)/i3lock-unlock_indicator.Po \ | |
149 | ./$(DEPDIR)/i3lock-xcb.Po | |
150 | am__mv = mv -f | |
151 | AM_V_lt = $(am__v_lt_@AM_V@) | |
152 | am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) | |
153 | am__v_lt_0 = --silent | |
154 | am__v_lt_1 = | |
155 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | |
156 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | |
157 | AM_V_CC = $(am__v_CC_@AM_V@) | |
158 | am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) | |
159 | am__v_CC_0 = @echo " CC " $@; | |
160 | am__v_CC_1 = | |
161 | CCLD = $(CC) | |
162 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | |
163 | AM_V_CCLD = $(am__v_CCLD_@AM_V@) | |
164 | am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) | |
165 | am__v_CCLD_0 = @echo " CCLD " $@; | |
166 | am__v_CCLD_1 = | |
167 | SOURCES = $(i3lock_SOURCES) | |
168 | DIST_SOURCES = $(i3lock_SOURCES) | |
169 | am__can_run_installinfo = \ | |
170 | case $$AM_UPDATE_INFO_DIR in \ | |
171 | n|no|NO) false;; \ | |
172 | *) (install-info --version) >/dev/null 2>&1;; \ | |
173 | esac | |
174 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | |
175 | am__vpath_adj = case $$p in \ | |
176 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | |
177 | *) f=$$p;; \ | |
178 | esac; | |
179 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | |
180 | am__install_max = 40 | |
181 | am__nobase_strip_setup = \ | |
182 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | |
183 | am__nobase_strip = \ | |
184 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | |
185 | am__nobase_list = $(am__nobase_strip_setup); \ | |
186 | for p in $$list; do echo "$$p $$p"; done | \ | |
187 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | |
188 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | |
189 | if (++n[$$2] == $(am__install_max)) \ | |
190 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | |
191 | END { for (dir in files) print dir, files[dir] }' | |
192 | am__base_list = \ | |
193 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | |
194 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | |
195 | am__uninstall_files_from_dir = { \ | |
196 | test -z "$$files" \ | |
197 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ | |
198 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ | |
199 | $(am__cd) "$$dir" && rm -f $$files; }; \ | |
200 | } | |
201 | man1dir = $(mandir)/man1 | |
202 | NROFF = nroff | |
203 | MANS = $(dist_man1_MANS) | |
204 | DATA = $(pamd_DATA) | |
205 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ | |
206 | config.h.in | |
207 | # Read a list of newline-separated strings from the standard input, | |
208 | # and print each of them once, without duplicates. Input order is | |
209 | # *not* preserved. | |
210 | am__uniquify_input = $(AWK) '\ | |
211 | BEGIN { nonempty = 0; } \ | |
212 | { items[$$0] = 1; nonempty = 1; } \ | |
213 | END { if (nonempty) { for (i in items) print i; }; } \ | |
214 | ' | |
215 | # Make sure the list of sources is unique. This is necessary because, | |
216 | # e.g., the same source file might be shared among _SOURCES variables | |
217 | # for different programs/libraries. | |
218 | am__define_uniq_tagged_files = \ | |
219 | list='$(am__tagged_files)'; \ | |
220 | unique=`for i in $$list; do \ | |
221 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | |
222 | done | $(am__uniquify_input)` | |
223 | ETAGS = etags | |
224 | CTAGS = ctags | |
225 | CSCOPE = cscope | |
226 | AM_RECURSIVE_TARGETS = cscope | |
227 | am__DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.in \ | |
228 | $(srcdir)/config.h.in ar-lib compile config.guess config.sub \ | |
229 | depcomp install-sh missing | |
230 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
231 | distdir = $(PACKAGE)-$(VERSION) | |
232 | top_distdir = $(distdir) | |
233 | am__remove_distdir = \ | |
234 | if test -d "$(distdir)"; then \ | |
235 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ | |
236 | && rm -rf "$(distdir)" \ | |
237 | || { sleep 5 && rm -rf "$(distdir)"; }; \ | |
238 | else :; fi | |
239 | am__post_remove_distdir = $(am__remove_distdir) | |
240 | GZIP_ENV = --best | |
241 | DIST_ARCHIVES = $(distdir).tar.bz2 | |
242 | DIST_TARGETS = dist-bzip2 | |
243 | distuninstallcheck_listfiles = find . -type f -print | |
244 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | |
245 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | |
246 | distcleancheck_listfiles = find . -type f -print | |
247 | ACLOCAL = @ACLOCAL@ | |
248 | AMTAR = @AMTAR@ | |
249 | AM_CFLAGS = @AM_CFLAGS@ | |
250 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | |
251 | AR = @AR@ | |
252 | AUTOCONF = @AUTOCONF@ | |
253 | AUTOHEADER = @AUTOHEADER@ | |
254 | AUTOMAKE = @AUTOMAKE@ | |
255 | AWK = @AWK@ | |
256 | AX_EXTEND_SRCDIR_CPPFLAGS = @AX_EXTEND_SRCDIR_CPPFLAGS@ | |
257 | CAIRO_CFLAGS = @CAIRO_CFLAGS@ | |
258 | CAIRO_LIBS = @CAIRO_LIBS@ | |
259 | CC = @CC@ | |
260 | CCDEPMODE = @CCDEPMODE@ | |
261 | CFLAGS = @CFLAGS@ | |
262 | CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ | |
263 | CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ | |
264 | CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ | |
265 | CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ | |
266 | CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ | |
267 | CPP = @CPP@ | |
268 | CPPFLAGS = @CPPFLAGS@ | |
269 | CYGPATH_W = @CYGPATH_W@ | |
270 | DEFS = @DEFS@ | |
271 | DEPDIR = @DEPDIR@ | |
272 | ECHO_C = @ECHO_C@ | |
273 | ECHO_N = @ECHO_N@ | |
274 | ECHO_T = @ECHO_T@ | |
275 | EGREP = @EGREP@ | |
276 | EXEEXT = @EXEEXT@ | |
277 | GCOV = @GCOV@ | |
278 | GENHTML = @GENHTML@ | |
279 | GREP = @GREP@ | |
280 | I3LOCK_VERSION = @I3LOCK_VERSION@ | |
281 | INSTALL = @INSTALL@ | |
282 | INSTALL_DATA = @INSTALL_DATA@ | |
283 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
284 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
285 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
286 | LCOV = @LCOV@ | |
287 | LDFLAGS = @LDFLAGS@ | |
288 | LIBOBJS = @LIBOBJS@ | |
289 | LIBS = @LIBS@ | |
290 | LN_S = @LN_S@ | |
291 | LTLIBOBJS = @LTLIBOBJS@ | |
292 | MAINT = @MAINT@ | |
293 | MAKEINFO = @MAKEINFO@ | |
294 | MKDIR_P = @MKDIR_P@ | |
295 | OBJEXT = @OBJEXT@ | |
296 | PACKAGE = @PACKAGE@ | |
297 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
298 | PACKAGE_NAME = @PACKAGE_NAME@ | |
299 | PACKAGE_STRING = @PACKAGE_STRING@ | |
300 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
301 | PACKAGE_URL = @PACKAGE_URL@ | |
302 | PACKAGE_VERSION = @PACKAGE_VERSION@ | |
303 | PATH_SEPARATOR = @PATH_SEPARATOR@ | |
304 | PKG_CONFIG = @PKG_CONFIG@ | |
305 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
306 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
307 | RANLIB = @RANLIB@ | |
308 | SED = @SED@ | |
309 | SET_MAKE = @SET_MAKE@ | |
310 | SHELL = @SHELL@ | |
311 | STRIP = @STRIP@ | |
312 | VERSION = @VERSION@ | |
313 | XCB_CFLAGS = @XCB_CFLAGS@ | |
314 | XCB_IMAGE_CFLAGS = @XCB_IMAGE_CFLAGS@ | |
315 | XCB_IMAGE_LIBS = @XCB_IMAGE_LIBS@ | |
316 | XCB_LIBS = @XCB_LIBS@ | |
317 | XCB_UTIL_CFLAGS = @XCB_UTIL_CFLAGS@ | |
318 | XCB_UTIL_LIBS = @XCB_UTIL_LIBS@ | |
319 | XCB_UTIL_XRM_CFLAGS = @XCB_UTIL_XRM_CFLAGS@ | |
320 | XCB_UTIL_XRM_LIBS = @XCB_UTIL_XRM_LIBS@ | |
321 | XKBCOMMON_CFLAGS = @XKBCOMMON_CFLAGS@ | |
322 | XKBCOMMON_LIBS = @XKBCOMMON_LIBS@ | |
323 | abs_builddir = @abs_builddir@ | |
324 | abs_srcdir = @abs_srcdir@ | |
325 | abs_top_builddir = @abs_top_builddir@ | |
326 | abs_top_srcdir = @abs_top_srcdir@ | |
327 | ac_ct_AR = @ac_ct_AR@ | |
328 | ac_ct_CC = @ac_ct_CC@ | |
329 | am__include = @am__include@ | |
330 | am__leading_dot = @am__leading_dot@ | |
331 | am__quote = @am__quote@ | |
332 | am__tar = @am__tar@ | |
333 | am__untar = @am__untar@ | |
334 | ax_enable_builddir_sed = @ax_enable_builddir_sed@ | |
335 | bindir = @bindir@ | |
336 | build = @build@ | |
337 | build_alias = @build_alias@ | |
338 | build_cpu = @build_cpu@ | |
339 | build_os = @build_os@ | |
340 | build_vendor = @build_vendor@ | |
341 | builddir = @builddir@ | |
342 | datadir = @datadir@ | |
343 | datarootdir = @datarootdir@ | |
344 | docdir = @docdir@ | |
345 | dvidir = @dvidir@ | |
346 | exec_prefix = @exec_prefix@ | |
347 | host = @host@ | |
348 | host_alias = @host_alias@ | |
349 | host_cpu = @host_cpu@ | |
350 | host_os = @host_os@ | |
351 | host_vendor = @host_vendor@ | |
352 | htmldir = @htmldir@ | |
353 | ifGNUmake = @ifGNUmake@ | |
354 | includedir = @includedir@ | |
355 | infodir = @infodir@ | |
356 | install_sh = @install_sh@ | |
357 | libdir = @libdir@ | |
358 | libexecdir = @libexecdir@ | |
359 | localedir = @localedir@ | |
360 | localstatedir = @localstatedir@ | |
361 | mandir = @mandir@ | |
362 | mkdir_p = @mkdir_p@ | |
363 | oldincludedir = @oldincludedir@ | |
364 | pdfdir = @pdfdir@ | |
365 | prefix = @prefix@ | |
366 | program_transform_name = @program_transform_name@ | |
367 | psdir = @psdir@ | |
368 | sbindir = @sbindir@ | |
369 | sharedstatedir = @sharedstatedir@ | |
370 | srcdir = @srcdir@ | |
371 | sysconfdir = @sysconfdir@ | |
372 | target = @target@ | |
373 | target_alias = @target_alias@ | |
374 | target_cpu = @target_cpu@ | |
375 | target_os = @target_os@ | |
376 | target_vendor = @target_vendor@ | |
377 | top_build_prefix = @top_build_prefix@ | |
378 | top_builddir = @top_builddir@ | |
379 | top_srcdir = @top_srcdir@ | |
380 | dist_man1_MANS = i3lock.1 | |
381 | pamddir = $(sysconfdir)/pam.d | |
382 | pamd_files = pam/i3lock | |
383 | pamd_DATA = $(pamd_files) | |
384 | AM_CPPFLAGS = \ | |
385 | @AX_EXTEND_SRCDIR_CPPFLAGS@ | |
386 | ||
387 | i3lock_CFLAGS = \ | |
388 | $(AM_CFLAGS) \ | |
389 | $(XCB_CFLAGS) \ | |
390 | $(XCB_IMAGE_CFLAGS) \ | |
391 | $(XCB_UTIL_CFLAGS) \ | |
392 | $(XCB_UTIL_XRM_CFLAGS) \ | |
393 | $(XKBCOMMON_CFLAGS) \ | |
394 | $(CAIRO_CFLAGS) \ | |
395 | $(CODE_COVERAGE_CFLAGS) | |
396 | ||
397 | i3lock_CPPFLAGS = \ | |
398 | $(AM_CPPFLAGS) \ | |
399 | $(CODE_COVERAGE_CPPFLAGS) | |
400 | ||
401 | i3lock_LDADD = \ | |
402 | $(XCB_LIBS) \ | |
403 | $(XCB_IMAGE_LIBS) \ | |
404 | $(XCB_UTIL_LIBS) \ | |
405 | $(XCB_UTIL_XRM_LIBS) \ | |
406 | $(XKBCOMMON_LIBS) \ | |
407 | $(CAIRO_LIBS) \ | |
408 | $(CODE_COVERAGE_LDFLAGS) | |
409 | ||
410 | i3lock_SOURCES = \ | |
411 | cursors.h \ | |
412 | dpi.c \ | |
413 | dpi.h \ | |
414 | i3lock.c \ | |
415 | i3lock.h \ | |
416 | randr.c \ | |
417 | randr.h \ | |
418 | unlock_indicator.c \ | |
419 | unlock_indicator.h \ | |
420 | xcb.c \ | |
421 | xcb.h | |
422 | ||
423 | EXTRA_DIST = \ | |
424 | $(pamd_files) \ | |
425 | CHANGELOG \ | |
426 | LICENSE \ | |
427 | README.md \ | |
428 | I3LOCK_VERSION | |
429 | ||
430 | all: config.h | |
431 | $(MAKE) $(AM_MAKEFLAGS) all-am | |
432 | ||
433 | .SUFFIXES: | |
434 | .SUFFIXES: .c .o .obj | |
435 | am--refresh: Makefile | |
436 | @: | |
437 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) | |
438 | @for dep in $?; do \ | |
439 | case '$(am__configure_deps)' in \ | |
440 | *$$dep*) \ | |
441 | echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ | |
442 | $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ | |
443 | && exit 0; \ | |
444 | exit 1;; \ | |
445 | esac; \ | |
446 | done; \ | |
447 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ | |
448 | $(am__cd) $(top_srcdir) && \ | |
449 | $(AUTOMAKE) --foreign Makefile | |
450 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
451 | @case '$?' in \ | |
452 | *config.status*) \ | |
453 | echo ' $(SHELL) ./config.status'; \ | |
454 | $(SHELL) ./config.status;; \ | |
455 | *) \ | |
456 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ | |
457 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ | |
458 | esac; | |
459 | ||
460 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | |
461 | $(SHELL) ./config.status --recheck | |
462 | ||
463 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) | |
464 | $(am__cd) $(srcdir) && $(AUTOCONF) | |
465 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) | |
466 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | |
467 | $(am__aclocal_m4_deps): | |
468 | ||
469 | config.h: stamp-h1 | |
470 | @test -f $@ || rm -f stamp-h1 | |
471 | @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 | |
472 | ||
473 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status | |
474 | @rm -f stamp-h1 | |
475 | cd $(top_builddir) && $(SHELL) ./config.status config.h | |
476 | $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) | |
477 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) | |
478 | rm -f stamp-h1 | |
479 | touch $@ | |
480 | ||
481 | distclean-hdr: | |
482 | -rm -f config.h stamp-h1 | |
483 | install-binPROGRAMS: $(bin_PROGRAMS) | |
484 | @$(NORMAL_INSTALL) | |
485 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | |
486 | if test -n "$$list"; then \ | |
487 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ | |
488 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ | |
489 | fi; \ | |
490 | for p in $$list; do echo "$$p $$p"; done | \ | |
491 | sed 's/$(EXEEXT)$$//' | \ | |
492 | while read p p1; do if test -f $$p \ | |
493 | ; then echo "$$p"; echo "$$p"; else :; fi; \ | |
494 | done | \ | |
495 | sed -e 'p;s,.*/,,;n;h' \ | |
496 | -e 's|.*|.|' \ | |
497 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ | |
498 | sed 'N;N;N;s,\n, ,g' | \ | |
499 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ | |
500 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | |
501 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ | |
502 | else { print "f", $$3 "/" $$4, $$1; } } \ | |
503 | END { for (d in files) print "f", d, files[d] }' | \ | |
504 | while read type dir files; do \ | |
505 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | |
506 | test -z "$$files" || { \ | |
507 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ | |
508 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ | |
509 | } \ | |
510 | ; done | |
511 | ||
512 | uninstall-binPROGRAMS: | |
513 | @$(NORMAL_UNINSTALL) | |
514 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | |
515 | files=`for p in $$list; do echo "$$p"; done | \ | |
516 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | |
517 | -e 's/$$/$(EXEEXT)/' \ | |
518 | `; \ | |
519 | test -n "$$list" || exit 0; \ | |
520 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ | |
521 | cd "$(DESTDIR)$(bindir)" && rm -f $$files | |
522 | ||
523 | clean-binPROGRAMS: | |
524 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) | |
525 | ||
526 | i3lock$(EXEEXT): $(i3lock_OBJECTS) $(i3lock_DEPENDENCIES) $(EXTRA_i3lock_DEPENDENCIES) | |
527 | @rm -f i3lock$(EXEEXT) | |
528 | $(AM_V_CCLD)$(i3lock_LINK) $(i3lock_OBJECTS) $(i3lock_LDADD) $(LIBS) | |
529 | ||
530 | mostlyclean-compile: | |
531 | -rm -f *.$(OBJEXT) | |
532 | ||
533 | distclean-compile: | |
534 | -rm -f *.tab.c | |
535 | ||
536 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i3lock-dpi.Po@am__quote@ # am--include-marker | |
537 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i3lock-i3lock.Po@am__quote@ # am--include-marker | |
538 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i3lock-randr.Po@am__quote@ # am--include-marker | |
539 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i3lock-unlock_indicator.Po@am__quote@ # am--include-marker | |
540 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i3lock-xcb.Po@am__quote@ # am--include-marker | |
541 | ||
542 | $(am__depfiles_remade): | |
543 | @$(MKDIR_P) $(@D) | |
544 | @echo '# dummy' >$@-t && $(am__mv) $@-t $@ | |
545 | ||
546 | am--depfiles: $(am__depfiles_remade) | |
547 | ||
548 | .c.o: | |
549 | @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ | |
550 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ | |
551 | @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po | |
552 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
553 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
554 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< | |
555 | ||
556 | .c.obj: | |
557 | @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ | |
558 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ | |
559 | @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po | |
560 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
561 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
562 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` | |
563 | ||
564 | i3lock-dpi.o: dpi.c | |
565 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-dpi.o -MD -MP -MF $(DEPDIR)/i3lock-dpi.Tpo -c -o i3lock-dpi.o `test -f 'dpi.c' || echo '$(srcdir)/'`dpi.c | |
566 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-dpi.Tpo $(DEPDIR)/i3lock-dpi.Po | |
567 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dpi.c' object='i3lock-dpi.o' libtool=no @AMDEPBACKSLASH@ | |
568 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
569 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-dpi.o `test -f 'dpi.c' || echo '$(srcdir)/'`dpi.c | |
570 | ||
571 | i3lock-dpi.obj: dpi.c | |
572 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-dpi.obj -MD -MP -MF $(DEPDIR)/i3lock-dpi.Tpo -c -o i3lock-dpi.obj `if test -f 'dpi.c'; then $(CYGPATH_W) 'dpi.c'; else $(CYGPATH_W) '$(srcdir)/dpi.c'; fi` | |
573 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-dpi.Tpo $(DEPDIR)/i3lock-dpi.Po | |
574 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dpi.c' object='i3lock-dpi.obj' libtool=no @AMDEPBACKSLASH@ | |
575 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
576 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-dpi.obj `if test -f 'dpi.c'; then $(CYGPATH_W) 'dpi.c'; else $(CYGPATH_W) '$(srcdir)/dpi.c'; fi` | |
577 | ||
578 | i3lock-i3lock.o: i3lock.c | |
579 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-i3lock.o -MD -MP -MF $(DEPDIR)/i3lock-i3lock.Tpo -c -o i3lock-i3lock.o `test -f 'i3lock.c' || echo '$(srcdir)/'`i3lock.c | |
580 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-i3lock.Tpo $(DEPDIR)/i3lock-i3lock.Po | |
581 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='i3lock.c' object='i3lock-i3lock.o' libtool=no @AMDEPBACKSLASH@ | |
582 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
583 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-i3lock.o `test -f 'i3lock.c' || echo '$(srcdir)/'`i3lock.c | |
584 | ||
585 | i3lock-i3lock.obj: i3lock.c | |
586 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-i3lock.obj -MD -MP -MF $(DEPDIR)/i3lock-i3lock.Tpo -c -o i3lock-i3lock.obj `if test -f 'i3lock.c'; then $(CYGPATH_W) 'i3lock.c'; else $(CYGPATH_W) '$(srcdir)/i3lock.c'; fi` | |
587 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-i3lock.Tpo $(DEPDIR)/i3lock-i3lock.Po | |
588 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='i3lock.c' object='i3lock-i3lock.obj' libtool=no @AMDEPBACKSLASH@ | |
589 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
590 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-i3lock.obj `if test -f 'i3lock.c'; then $(CYGPATH_W) 'i3lock.c'; else $(CYGPATH_W) '$(srcdir)/i3lock.c'; fi` | |
591 | ||
592 | i3lock-randr.o: randr.c | |
593 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-randr.o -MD -MP -MF $(DEPDIR)/i3lock-randr.Tpo -c -o i3lock-randr.o `test -f 'randr.c' || echo '$(srcdir)/'`randr.c | |
594 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-randr.Tpo $(DEPDIR)/i3lock-randr.Po | |
595 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='randr.c' object='i3lock-randr.o' libtool=no @AMDEPBACKSLASH@ | |
596 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
597 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-randr.o `test -f 'randr.c' || echo '$(srcdir)/'`randr.c | |
598 | ||
599 | i3lock-randr.obj: randr.c | |
600 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-randr.obj -MD -MP -MF $(DEPDIR)/i3lock-randr.Tpo -c -o i3lock-randr.obj `if test -f 'randr.c'; then $(CYGPATH_W) 'randr.c'; else $(CYGPATH_W) '$(srcdir)/randr.c'; fi` | |
601 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-randr.Tpo $(DEPDIR)/i3lock-randr.Po | |
602 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='randr.c' object='i3lock-randr.obj' libtool=no @AMDEPBACKSLASH@ | |
603 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
604 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-randr.obj `if test -f 'randr.c'; then $(CYGPATH_W) 'randr.c'; else $(CYGPATH_W) '$(srcdir)/randr.c'; fi` | |
605 | ||
606 | i3lock-unlock_indicator.o: unlock_indicator.c | |
607 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-unlock_indicator.o -MD -MP -MF $(DEPDIR)/i3lock-unlock_indicator.Tpo -c -o i3lock-unlock_indicator.o `test -f 'unlock_indicator.c' || echo '$(srcdir)/'`unlock_indicator.c | |
608 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-unlock_indicator.Tpo $(DEPDIR)/i3lock-unlock_indicator.Po | |
609 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unlock_indicator.c' object='i3lock-unlock_indicator.o' libtool=no @AMDEPBACKSLASH@ | |
610 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
611 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-unlock_indicator.o `test -f 'unlock_indicator.c' || echo '$(srcdir)/'`unlock_indicator.c | |
612 | ||
613 | i3lock-unlock_indicator.obj: unlock_indicator.c | |
614 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-unlock_indicator.obj -MD -MP -MF $(DEPDIR)/i3lock-unlock_indicator.Tpo -c -o i3lock-unlock_indicator.obj `if test -f 'unlock_indicator.c'; then $(CYGPATH_W) 'unlock_indicator.c'; else $(CYGPATH_W) '$(srcdir)/unlock_indicator.c'; fi` | |
615 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-unlock_indicator.Tpo $(DEPDIR)/i3lock-unlock_indicator.Po | |
616 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unlock_indicator.c' object='i3lock-unlock_indicator.obj' libtool=no @AMDEPBACKSLASH@ | |
617 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
618 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-unlock_indicator.obj `if test -f 'unlock_indicator.c'; then $(CYGPATH_W) 'unlock_indicator.c'; else $(CYGPATH_W) '$(srcdir)/unlock_indicator.c'; fi` | |
619 | ||
620 | i3lock-xcb.o: xcb.c | |
621 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-xcb.o -MD -MP -MF $(DEPDIR)/i3lock-xcb.Tpo -c -o i3lock-xcb.o `test -f 'xcb.c' || echo '$(srcdir)/'`xcb.c | |
622 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-xcb.Tpo $(DEPDIR)/i3lock-xcb.Po | |
623 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xcb.c' object='i3lock-xcb.o' libtool=no @AMDEPBACKSLASH@ | |
624 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
625 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-xcb.o `test -f 'xcb.c' || echo '$(srcdir)/'`xcb.c | |
626 | ||
627 | i3lock-xcb.obj: xcb.c | |
628 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -MT i3lock-xcb.obj -MD -MP -MF $(DEPDIR)/i3lock-xcb.Tpo -c -o i3lock-xcb.obj `if test -f 'xcb.c'; then $(CYGPATH_W) 'xcb.c'; else $(CYGPATH_W) '$(srcdir)/xcb.c'; fi` | |
629 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/i3lock-xcb.Tpo $(DEPDIR)/i3lock-xcb.Po | |
630 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xcb.c' object='i3lock-xcb.obj' libtool=no @AMDEPBACKSLASH@ | |
631 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
632 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(i3lock_CPPFLAGS) $(CPPFLAGS) $(i3lock_CFLAGS) $(CFLAGS) -c -o i3lock-xcb.obj `if test -f 'xcb.c'; then $(CYGPATH_W) 'xcb.c'; else $(CYGPATH_W) '$(srcdir)/xcb.c'; fi` | |
633 | install-man1: $(dist_man1_MANS) | |
634 | @$(NORMAL_INSTALL) | |
635 | @list1='$(dist_man1_MANS)'; \ | |
636 | list2=''; \ | |
637 | test -n "$(man1dir)" \ | |
638 | && test -n "`echo $$list1$$list2`" \ | |
639 | || exit 0; \ | |
640 | echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ | |
641 | $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ | |
642 | { for i in $$list1; do echo "$$i"; done; \ | |
643 | if test -n "$$list2"; then \ | |
644 | for i in $$list2; do echo "$$i"; done \ | |
645 | | sed -n '/\.1[a-z]*$$/p'; \ | |
646 | fi; \ | |
647 | } | while read p; do \ | |
648 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ | |
649 | echo "$$d$$p"; echo "$$p"; \ | |
650 | done | \ | |
651 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ | |
652 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ | |
653 | sed 'N;N;s,\n, ,g' | { \ | |
654 | list=; while read file base inst; do \ | |
655 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ | |
656 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ | |
657 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ | |
658 | fi; \ | |
659 | done; \ | |
660 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ | |
661 | while read files; do \ | |
662 | test -z "$$files" || { \ | |
663 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ | |
664 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ | |
665 | done; } | |
666 | ||
667 | uninstall-man1: | |
668 | @$(NORMAL_UNINSTALL) | |
669 | @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ | |
670 | files=`{ for i in $$list; do echo "$$i"; done; \ | |
671 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ | |
672 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ | |
673 | dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) | |
674 | install-pamdDATA: $(pamd_DATA) | |
675 | @$(NORMAL_INSTALL) | |
676 | @list='$(pamd_DATA)'; test -n "$(pamddir)" || list=; \ | |
677 | if test -n "$$list"; then \ | |
678 | echo " $(MKDIR_P) '$(DESTDIR)$(pamddir)'"; \ | |
679 | $(MKDIR_P) "$(DESTDIR)$(pamddir)" || exit 1; \ | |
680 | fi; \ | |
681 | for p in $$list; do \ | |
682 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | |
683 | echo "$$d$$p"; \ | |
684 | done | $(am__base_list) | \ | |
685 | while read files; do \ | |
686 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pamddir)'"; \ | |
687 | $(INSTALL_DATA) $$files "$(DESTDIR)$(pamddir)" || exit $$?; \ | |
688 | done | |
689 | ||
690 | uninstall-pamdDATA: | |
691 | @$(NORMAL_UNINSTALL) | |
692 | @list='$(pamd_DATA)'; test -n "$(pamddir)" || list=; \ | |
693 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | |
694 | dir='$(DESTDIR)$(pamddir)'; $(am__uninstall_files_from_dir) | |
695 | ||
696 | ID: $(am__tagged_files) | |
697 | $(am__define_uniq_tagged_files); mkid -fID $$unique | |
698 | tags: tags-am | |
699 | TAGS: tags | |
700 | ||
701 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | |
702 | set x; \ | |
703 | here=`pwd`; \ | |
704 | $(am__define_uniq_tagged_files); \ | |
705 | shift; \ | |
706 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | |
707 | test -n "$$unique" || unique=$$empty_fix; \ | |
708 | if test $$# -gt 0; then \ | |
709 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
710 | "$$@" $$unique; \ | |
711 | else \ | |
712 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | |
713 | $$unique; \ | |
714 | fi; \ | |
715 | fi | |
716 | ctags: ctags-am | |
717 | ||
718 | CTAGS: ctags | |
719 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | |
720 | $(am__define_uniq_tagged_files); \ | |
721 | test -z "$(CTAGS_ARGS)$$unique" \ | |
722 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | |
723 | $$unique | |
724 | ||
725 | GTAGS: | |
726 | here=`$(am__cd) $(top_builddir) && pwd` \ | |
727 | && $(am__cd) $(top_srcdir) \ | |
728 | && gtags -i $(GTAGS_ARGS) "$$here" | |
729 | cscope: cscope.files | |
730 | test ! -s cscope.files \ | |
731 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) | |
732 | clean-cscope: | |
733 | -rm -f cscope.files | |
734 | cscope.files: clean-cscope cscopelist | |
735 | cscopelist: cscopelist-am | |
736 | ||
737 | cscopelist-am: $(am__tagged_files) | |
738 | list='$(am__tagged_files)'; \ | |
739 | case "$(srcdir)" in \ | |
740 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ | |
741 | *) sdir=$(subdir)/$(srcdir) ;; \ | |
742 | esac; \ | |
743 | for i in $$list; do \ | |
744 | if test -f "$$i"; then \ | |
745 | echo "$(subdir)/$$i"; \ | |
746 | else \ | |
747 | echo "$$sdir/$$i"; \ | |
748 | fi; \ | |
749 | done >> $(top_builddir)/cscope.files | |
750 | ||
751 | distclean-tags: | |
752 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | |
753 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files | |
754 | ||
755 | distdir: $(BUILT_SOURCES) | |
756 | $(MAKE) $(AM_MAKEFLAGS) distdir-am | |
757 | ||
758 | distdir-am: $(DISTFILES) | |
759 | $(am__remove_distdir) | |
760 | test -d "$(distdir)" || mkdir "$(distdir)" | |
761 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
762 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
763 | list='$(DISTFILES)'; \ | |
764 | dist_files=`for file in $$list; do echo $$file; done | \ | |
765 | sed -e "s|^$$srcdirstrip/||;t" \ | |
766 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
767 | case $$dist_files in \ | |
768 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
769 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | |
770 | sort -u` ;; \ | |
771 | esac; \ | |
772 | for file in $$dist_files; do \ | |
773 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
774 | if test -d $$d/$$file; then \ | |
775 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
776 | if test -d "$(distdir)/$$file"; then \ | |
777 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
778 | fi; \ | |
779 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
780 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
781 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
782 | fi; \ | |
783 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
784 | else \ | |
785 | test -f "$(distdir)/$$file" \ | |
786 | || cp -p $$d/$$file "$(distdir)/$$file" \ | |
787 | || exit 1; \ | |
788 | fi; \ | |
789 | done | |
790 | -test -n "$(am__skip_mode_fix)" \ | |
791 | || find "$(distdir)" -type d ! -perm -755 \ | |
792 | -exec chmod u+rwx,go+rx {} \; -o \ | |
793 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | |
794 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | |
795 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ | |
796 | || chmod -R a+r "$(distdir)" | |
797 | dist-gzip: distdir | |
798 | tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz | |
799 | $(am__post_remove_distdir) | |
800 | dist-bzip2: distdir | |
801 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 | |
802 | $(am__post_remove_distdir) | |
803 | ||
804 | dist-lzip: distdir | |
805 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz | |
806 | $(am__post_remove_distdir) | |
807 | ||
808 | dist-xz: distdir | |
809 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz | |
810 | $(am__post_remove_distdir) | |
811 | ||
812 | dist-zstd: distdir | |
813 | tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst | |
814 | $(am__post_remove_distdir) | |
815 | ||
816 | dist-tarZ: distdir | |
817 | @echo WARNING: "Support for distribution archives compressed with" \ | |
818 | "legacy program 'compress' is deprecated." >&2 | |
819 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | |
820 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z | |
821 | $(am__post_remove_distdir) | |
822 | ||
823 | dist-shar: distdir | |
824 | @echo WARNING: "Support for shar distribution archives is" \ | |
825 | "deprecated." >&2 | |
826 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | |
827 | shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz | |
828 | $(am__post_remove_distdir) | |
829 | ||
830 | dist-zip: distdir | |
831 | -rm -f $(distdir).zip | |
832 | zip -rq $(distdir).zip $(distdir) | |
833 | $(am__post_remove_distdir) | |
834 | ||
835 | dist dist-all: | |
836 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' | |
837 | $(am__post_remove_distdir) | |
838 | ||
839 | # This target untars the dist file and tries a VPATH configuration. Then | |
840 | # it guarantees that the distribution is self-contained by making another | |
841 | # tarfile. | |
842 | distcheck: dist | |
843 | case '$(DIST_ARCHIVES)' in \ | |
844 | *.tar.gz*) \ | |
845 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
846 | *.tar.bz2*) \ | |
847 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | |
848 | *.tar.lz*) \ | |
849 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ | |
850 | *.tar.xz*) \ | |
851 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | |
852 | *.tar.Z*) \ | |
853 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ | |
854 | *.shar.gz*) \ | |
855 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ | |
856 | *.zip*) \ | |
857 | unzip $(distdir).zip ;;\ | |
858 | *.tar.zst*) \ | |
859 | zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ | |
860 | esac | |
861 | chmod -R a-w $(distdir) | |
862 | chmod u+w $(distdir) | |
863 | mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst | |
864 | chmod a-w $(distdir) | |
865 | test -d $(distdir)/_build || exit 0; \ | |
866 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | |
867 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | |
868 | && am__cwd=`pwd` \ | |
869 | && $(am__cd) $(distdir)/_build/sub \ | |
870 | && ../../configure \ | |
871 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | |
872 | $(DISTCHECK_CONFIGURE_FLAGS) \ | |
873 | --srcdir=../.. --prefix="$$dc_install_base" \ | |
874 | && $(MAKE) $(AM_MAKEFLAGS) \ | |
875 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | |
876 | && $(MAKE) $(AM_MAKEFLAGS) check \ | |
877 | && $(MAKE) $(AM_MAKEFLAGS) install \ | |
878 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | |
879 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | |
880 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | |
881 | distuninstallcheck \ | |
882 | && chmod -R a-w "$$dc_install_base" \ | |
883 | && ({ \ | |
884 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | |
885 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | |
886 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | |
887 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | |
888 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | |
889 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ | |
890 | && rm -rf "$$dc_destdir" \ | |
891 | && $(MAKE) $(AM_MAKEFLAGS) dist \ | |
892 | && rm -rf $(DIST_ARCHIVES) \ | |
893 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | |
894 | && cd "$$am__cwd" \ | |
895 | || exit 1 | |
896 | $(am__post_remove_distdir) | |
897 | @(echo "$(distdir) archives ready for distribution: "; \ | |
898 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | |
899 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | |
900 | distuninstallcheck: | |
901 | @test -n '$(distuninstallcheck_dir)' || { \ | |
902 | echo 'ERROR: trying to run $@ with an empty' \ | |
903 | '$$(distuninstallcheck_dir)' >&2; \ | |
904 | exit 1; \ | |
905 | }; \ | |
906 | $(am__cd) '$(distuninstallcheck_dir)' || { \ | |
907 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | |
908 | exit 1; \ | |
909 | }; \ | |
910 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | |
911 | || { echo "ERROR: files left after uninstall:" ; \ | |
912 | if test -n "$(DESTDIR)"; then \ | |
913 | echo " (check DESTDIR support)"; \ | |
914 | fi ; \ | |
915 | $(distuninstallcheck_listfiles) ; \ | |
916 | exit 1; } >&2 | |
917 | distcleancheck: distclean | |
918 | @if test '$(srcdir)' = . ; then \ | |
919 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | |
920 | exit 1 ; \ | |
921 | fi | |
922 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | |
923 | || { echo "ERROR: files left in build directory after distclean:" ; \ | |
924 | $(distcleancheck_listfiles) ; \ | |
925 | exit 1; } >&2 | |
926 | check-am: all-am | |
927 | check: check-am | |
928 | all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h | |
929 | installdirs: | |
930 | for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pamddir)"; do \ | |
931 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | |
932 | done | |
933 | install: install-am | |
934 | install-exec: install-exec-am | |
935 | install-data: install-data-am | |
936 | uninstall: uninstall-am | |
937 | ||
938 | install-am: all-am | |
939 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | |
940 | ||
941 | installcheck: installcheck-am | |
942 | install-strip: | |
943 | if test -z '$(STRIP)'; then \ | |
944 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
945 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
946 | install; \ | |
947 | else \ | |
948 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
949 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
950 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | |
951 | fi | |
952 | mostlyclean-generic: | |
953 | ||
954 | clean-generic: | |
955 | ||
956 | distclean-generic: | |
957 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | |
958 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | |
959 | ||
960 | maintainer-clean-generic: | |
961 | @echo "This command is intended for maintainers to use" | |
962 | @echo "it deletes files that may require special tools to rebuild." | |
963 | clean: clean-am | |
964 | ||
965 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am | |
966 | ||
967 | distclean: distclean-am | |
968 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | |
969 | -rm -f ./$(DEPDIR)/i3lock-dpi.Po | |
970 | -rm -f ./$(DEPDIR)/i3lock-i3lock.Po | |
971 | -rm -f ./$(DEPDIR)/i3lock-randr.Po | |
972 | -rm -f ./$(DEPDIR)/i3lock-unlock_indicator.Po | |
973 | -rm -f ./$(DEPDIR)/i3lock-xcb.Po | |
974 | -rm -f Makefile | |
975 | distclean-am: clean-am distclean-compile distclean-generic \ | |
976 | distclean-hdr distclean-tags | |
977 | ||
978 | dvi: dvi-am | |
979 | ||
980 | dvi-am: | |
981 | ||
982 | html: html-am | |
983 | ||
984 | html-am: | |
985 | ||
986 | info: info-am | |
987 | ||
988 | info-am: | |
989 | ||
990 | install-data-am: install-man install-pamdDATA | |
991 | ||
992 | install-dvi: install-dvi-am | |
993 | ||
994 | install-dvi-am: | |
995 | ||
996 | install-exec-am: install-binPROGRAMS | |
997 | ||
998 | install-html: install-html-am | |
999 | ||
1000 | install-html-am: | |
1001 | ||
1002 | install-info: install-info-am | |
1003 | ||
1004 | install-info-am: | |
1005 | ||
1006 | install-man: install-man1 | |
1007 | ||
1008 | install-pdf: install-pdf-am | |
1009 | ||
1010 | install-pdf-am: | |
1011 | ||
1012 | install-ps: install-ps-am | |
1013 | ||
1014 | install-ps-am: | |
1015 | ||
1016 | installcheck-am: | |
1017 | ||
1018 | maintainer-clean: maintainer-clean-am | |
1019 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | |
1020 | -rm -rf $(top_srcdir)/autom4te.cache | |
1021 | -rm -f ./$(DEPDIR)/i3lock-dpi.Po | |
1022 | -rm -f ./$(DEPDIR)/i3lock-i3lock.Po | |
1023 | -rm -f ./$(DEPDIR)/i3lock-randr.Po | |
1024 | -rm -f ./$(DEPDIR)/i3lock-unlock_indicator.Po | |
1025 | -rm -f ./$(DEPDIR)/i3lock-xcb.Po | |
1026 | -rm -f Makefile | |
1027 | maintainer-clean-am: distclean-am maintainer-clean-generic | |
1028 | ||
1029 | mostlyclean: mostlyclean-am | |
1030 | ||
1031 | mostlyclean-am: mostlyclean-compile mostlyclean-generic | |
1032 | ||
1033 | pdf: pdf-am | |
1034 | ||
1035 | pdf-am: | |
1036 | ||
1037 | ps: ps-am | |
1038 | ||
1039 | ps-am: | |
1040 | ||
1041 | uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-pamdDATA | |
1042 | ||
1043 | uninstall-man: uninstall-man1 | |
1044 | ||
1045 | .MAKE: all install-am install-strip | |
1046 | ||
1047 | .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ | |
1048 | check-am clean clean-binPROGRAMS clean-cscope clean-generic \ | |
1049 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ | |
1050 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ | |
1051 | dist-zstd distcheck distclean distclean-compile \ | |
1052 | distclean-generic distclean-hdr distclean-tags distcleancheck \ | |
1053 | distdir distuninstallcheck dvi dvi-am html html-am info \ | |
1054 | info-am install install-am install-binPROGRAMS install-data \ | |
1055 | install-data-am install-dvi install-dvi-am install-exec \ | |
1056 | install-exec-am install-html install-html-am install-info \ | |
1057 | install-info-am install-man install-man1 install-pamdDATA \ | |
1058 | install-pdf install-pdf-am install-ps install-ps-am \ | |
1059 | install-strip installcheck installcheck-am installdirs \ | |
1060 | maintainer-clean maintainer-clean-generic mostlyclean \ | |
1061 | mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ | |
1062 | tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ | |
1063 | uninstall-man uninstall-man1 uninstall-pamdDATA | |
1064 | ||
1065 | .PRECIOUS: Makefile | |
1066 | ||
1067 | @CODE_COVERAGE_RULES@ | |
1068 | ||
1069 | echo-version: | |
1070 | @echo "@I3LOCK_VERSION@" | |
1071 | ||
1072 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
1073 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
1074 | .NOEXPORT: |
0 | 0 | i3lock - improved screen locker |
1 | 1 | =============================== |
2 | [i3lock](https://i3wm.org/i3lock/)> is a simple screen locker like slock. | |
2 | [i3lock](https://i3wm.org/i3lock/) is a simple screen locker like slock. | |
3 | 3 | After starting it, you will see a white screen (you can configure the |
4 | 4 | color/an image). You can return to your screen by entering your password. |
5 | 5 | |
43 | 43 | |
44 | 44 | Running i3lock |
45 | 45 | ------------- |
46 | Simply invoke the 'i3lock' command. To get out of it, enter your password and | |
47 | press enter. | |
46 | ||
47 | To test i3lock, you can directly run the `i3lock` command. To get out of it, | |
48 | enter your password and press enter. | |
49 | ||
50 | For a more permanent setup, we strongly recommend using `xss-lock` so that the | |
51 | screen is locked *before* your laptop suspends: | |
52 | ||
53 | ``` | |
54 | xss-lock --transfer-sleep-lock -- i3lock --nofork | |
55 | ``` | |
48 | 56 | |
49 | 57 | On OpenBSD the `i3lock` binary needs to be setgid `auth` to call the |
50 | 58 | authentication helpers, e.g. `/usr/libexec/auth/login_passwd`. |
57 | 65 | First install the dependencies listed in requirements section, then run these |
58 | 66 | commands (might need to be adapted to your OS): |
59 | 67 | ``` |
60 | autoreconf --force --install | |
61 | ||
62 | 68 | rm -rf build/ |
63 | 69 | mkdir -p build && cd build/ |
64 | 70 | |
65 | ../configure \ | |
66 | --prefix=/usr \ | |
67 | --sysconfdir=/etc \ | |
68 | --disable-sanitizers | |
69 | ||
70 | make | |
71 | meson .. -Dprefix=/usr | |
72 | ninja | |
71 | 73 | ``` |
72 | 74 | |
73 | 75 | Upstream |
0 | # generated automatically by aclocal 1.16.2 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
3 | ||
4 | # This file is free software; the Free Software Foundation | |
5 | # gives unlimited permission to copy and/or distribute it, | |
6 | # with or without modifications, as long as this notice is preserved. | |
7 | ||
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
10 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
11 | # PARTICULAR PURPOSE. | |
12 | ||
13 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | |
14 | m4_ifndef([AC_AUTOCONF_VERSION], | |
15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, | |
17 | [m4_warning([this file was generated for autoconf 2.69. | |
18 | You have another version of autoconf. It may work, but is not guaranteed to. | |
19 | If you have problems, you may need to regenerate the build system entirely. | |
20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) | |
21 | ||
22 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | |
23 | # serial 11 (pkg-config-0.29.1) | |
24 | ||
25 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | |
26 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> | |
27 | dnl | |
28 | dnl This program is free software; you can redistribute it and/or modify | |
29 | dnl it under the terms of the GNU General Public License as published by | |
30 | dnl the Free Software Foundation; either version 2 of the License, or | |
31 | dnl (at your option) any later version. | |
32 | dnl | |
33 | dnl This program is distributed in the hope that it will be useful, but | |
34 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of | |
35 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
36 | dnl General Public License for more details. | |
37 | dnl | |
38 | dnl You should have received a copy of the GNU General Public License | |
39 | dnl along with this program; if not, write to the Free Software | |
40 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
41 | dnl 02111-1307, USA. | |
42 | dnl | |
43 | dnl As a special exception to the GNU General Public License, if you | |
44 | dnl distribute this file as part of a program that contains a | |
45 | dnl configuration script generated by Autoconf, you may include it under | |
46 | dnl the same distribution terms that you use for the rest of that | |
47 | dnl program. | |
48 | ||
49 | dnl PKG_PREREQ(MIN-VERSION) | |
50 | dnl ----------------------- | |
51 | dnl Since: 0.29 | |
52 | dnl | |
53 | dnl Verify that the version of the pkg-config macros are at least | |
54 | dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's | |
55 | dnl installed version of pkg-config, this checks the developer's version | |
56 | dnl of pkg.m4 when generating configure. | |
57 | dnl | |
58 | dnl To ensure that this macro is defined, also add: | |
59 | dnl m4_ifndef([PKG_PREREQ], | |
60 | dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) | |
61 | dnl | |
62 | dnl See the "Since" comment for each macro you use to see what version | |
63 | dnl of the macros you require. | |
64 | m4_defun([PKG_PREREQ], | |
65 | [m4_define([PKG_MACROS_VERSION], [0.29.1]) | |
66 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | |
67 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) | |
68 | ])dnl PKG_PREREQ | |
69 | ||
70 | dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) | |
71 | dnl ---------------------------------- | |
72 | dnl Since: 0.16 | |
73 | dnl | |
74 | dnl Search for the pkg-config tool and set the PKG_CONFIG variable to | |
75 | dnl first found in the path. Checks that the version of pkg-config found | |
76 | dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is | |
77 | dnl used since that's the first version where most current features of | |
78 | dnl pkg-config existed. | |
79 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | |
80 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | |
81 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | |
82 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | |
83 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | |
84 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | |
85 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | |
86 | ||
87 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
88 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | |
89 | fi | |
90 | if test -n "$PKG_CONFIG"; then | |
91 | _pkg_min_version=m4_default([$1], [0.9.0]) | |
92 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | |
93 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
94 | AC_MSG_RESULT([yes]) | |
95 | else | |
96 | AC_MSG_RESULT([no]) | |
97 | PKG_CONFIG="" | |
98 | fi | |
99 | fi[]dnl | |
100 | ])dnl PKG_PROG_PKG_CONFIG | |
101 | ||
102 | dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
103 | dnl ------------------------------------------------------------------- | |
104 | dnl Since: 0.18 | |
105 | dnl | |
106 | dnl Check to see whether a particular set of modules exists. Similar to | |
107 | dnl PKG_CHECK_MODULES(), but does not set variables or print errors. | |
108 | dnl | |
109 | dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
110 | dnl only at the first occurence in configure.ac, so if the first place | |
111 | dnl it's called might be skipped (such as if it is within an "if", you | |
112 | dnl have to call PKG_CHECK_EXISTS manually | |
113 | AC_DEFUN([PKG_CHECK_EXISTS], | |
114 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
115 | if test -n "$PKG_CONFIG" && \ | |
116 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | |
117 | m4_default([$2], [:]) | |
118 | m4_ifvaln([$3], [else | |
119 | $3])dnl | |
120 | fi]) | |
121 | ||
122 | dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | |
123 | dnl --------------------------------------------- | |
124 | dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting | |
125 | dnl pkg_failed based on the result. | |
126 | m4_define([_PKG_CONFIG], | |
127 | [if test -n "$$1"; then | |
128 | pkg_cv_[]$1="$$1" | |
129 | elif test -n "$PKG_CONFIG"; then | |
130 | PKG_CHECK_EXISTS([$3], | |
131 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` | |
132 | test "x$?" != "x0" && pkg_failed=yes ], | |
133 | [pkg_failed=yes]) | |
134 | else | |
135 | pkg_failed=untried | |
136 | fi[]dnl | |
137 | ])dnl _PKG_CONFIG | |
138 | ||
139 | dnl _PKG_SHORT_ERRORS_SUPPORTED | |
140 | dnl --------------------------- | |
141 | dnl Internal check to see if pkg-config supports short errors. | |
142 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | |
143 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
144 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
145 | _pkg_short_errors_supported=yes | |
146 | else | |
147 | _pkg_short_errors_supported=no | |
148 | fi[]dnl | |
149 | ])dnl _PKG_SHORT_ERRORS_SUPPORTED | |
150 | ||
151 | ||
152 | dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | |
153 | dnl [ACTION-IF-NOT-FOUND]) | |
154 | dnl -------------------------------------------------------------- | |
155 | dnl Since: 0.4.0 | |
156 | dnl | |
157 | dnl Note that if there is a possibility the first call to | |
158 | dnl PKG_CHECK_MODULES might not happen, you should be sure to include an | |
159 | dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | |
160 | AC_DEFUN([PKG_CHECK_MODULES], | |
161 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
162 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | |
163 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | |
164 | ||
165 | pkg_failed=no | |
166 | AC_MSG_CHECKING([for $1]) | |
167 | ||
168 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | |
169 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | |
170 | ||
171 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | |
172 | and $1[]_LIBS to avoid the need to call pkg-config. | |
173 | See the pkg-config man page for more details.]) | |
174 | ||
175 | if test $pkg_failed = yes; then | |
176 | AC_MSG_RESULT([no]) | |
177 | _PKG_SHORT_ERRORS_SUPPORTED | |
178 | if test $_pkg_short_errors_supported = yes; then | |
179 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | |
180 | else | |
181 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | |
182 | fi | |
183 | # Put the nasty error message in config.log where it belongs | |
184 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | |
185 | ||
186 | m4_default([$4], [AC_MSG_ERROR( | |
187 | [Package requirements ($2) were not met: | |
188 | ||
189 | $$1_PKG_ERRORS | |
190 | ||
191 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
192 | installed software in a non-standard prefix. | |
193 | ||
194 | _PKG_TEXT])[]dnl | |
195 | ]) | |
196 | elif test $pkg_failed = untried; then | |
197 | AC_MSG_RESULT([no]) | |
198 | m4_default([$4], [AC_MSG_FAILURE( | |
199 | [The pkg-config script could not be found or is too old. Make sure it | |
200 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
201 | path to pkg-config. | |
202 | ||
203 | _PKG_TEXT | |
204 | ||
205 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | |
206 | ]) | |
207 | else | |
208 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | |
209 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | |
210 | AC_MSG_RESULT([yes]) | |
211 | $3 | |
212 | fi[]dnl | |
213 | ])dnl PKG_CHECK_MODULES | |
214 | ||
215 | ||
216 | dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | |
217 | dnl [ACTION-IF-NOT-FOUND]) | |
218 | dnl --------------------------------------------------------------------- | |
219 | dnl Since: 0.29 | |
220 | dnl | |
221 | dnl Checks for existence of MODULES and gathers its build flags with | |
222 | dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags | |
223 | dnl and VARIABLE-PREFIX_LIBS from --libs. | |
224 | dnl | |
225 | dnl Note that if there is a possibility the first call to | |
226 | dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to | |
227 | dnl include an explicit call to PKG_PROG_PKG_CONFIG in your | |
228 | dnl configure.ac. | |
229 | AC_DEFUN([PKG_CHECK_MODULES_STATIC], | |
230 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
231 | _save_PKG_CONFIG=$PKG_CONFIG | |
232 | PKG_CONFIG="$PKG_CONFIG --static" | |
233 | PKG_CHECK_MODULES($@) | |
234 | PKG_CONFIG=$_save_PKG_CONFIG[]dnl | |
235 | ])dnl PKG_CHECK_MODULES_STATIC | |
236 | ||
237 | ||
238 | dnl PKG_INSTALLDIR([DIRECTORY]) | |
239 | dnl ------------------------- | |
240 | dnl Since: 0.27 | |
241 | dnl | |
242 | dnl Substitutes the variable pkgconfigdir as the location where a module | |
243 | dnl should install pkg-config .pc files. By default the directory is | |
244 | dnl $libdir/pkgconfig, but the default can be changed by passing | |
245 | dnl DIRECTORY. The user can override through the --with-pkgconfigdir | |
246 | dnl parameter. | |
247 | AC_DEFUN([PKG_INSTALLDIR], | |
248 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | |
249 | m4_pushdef([pkg_description], | |
250 | [pkg-config installation directory @<:@]pkg_default[@:>@]) | |
251 | AC_ARG_WITH([pkgconfigdir], | |
252 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, | |
253 | [with_pkgconfigdir=]pkg_default) | |
254 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | |
255 | m4_popdef([pkg_default]) | |
256 | m4_popdef([pkg_description]) | |
257 | ])dnl PKG_INSTALLDIR | |
258 | ||
259 | ||
260 | dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) | |
261 | dnl -------------------------------- | |
262 | dnl Since: 0.27 | |
263 | dnl | |
264 | dnl Substitutes the variable noarch_pkgconfigdir as the location where a | |
265 | dnl module should install arch-independent pkg-config .pc files. By | |
266 | dnl default the directory is $datadir/pkgconfig, but the default can be | |
267 | dnl changed by passing DIRECTORY. The user can override through the | |
268 | dnl --with-noarch-pkgconfigdir parameter. | |
269 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], | |
270 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | |
271 | m4_pushdef([pkg_description], | |
272 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) | |
273 | AC_ARG_WITH([noarch-pkgconfigdir], | |
274 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, | |
275 | [with_noarch_pkgconfigdir=]pkg_default) | |
276 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | |
277 | m4_popdef([pkg_default]) | |
278 | m4_popdef([pkg_description]) | |
279 | ])dnl PKG_NOARCH_INSTALLDIR | |
280 | ||
281 | ||
282 | dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, | |
283 | dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
284 | dnl ------------------------------------------- | |
285 | dnl Since: 0.28 | |
286 | dnl | |
287 | dnl Retrieves the value of the pkg-config variable for the given module. | |
288 | AC_DEFUN([PKG_CHECK_VAR], | |
289 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | |
290 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | |
291 | ||
292 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | |
293 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | |
294 | ||
295 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | |
296 | ])dnl PKG_CHECK_VAR | |
297 | ||
298 | dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, | |
299 | dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], | |
300 | dnl [DESCRIPTION], [DEFAULT]) | |
301 | dnl ------------------------------------------ | |
302 | dnl | |
303 | dnl Prepare a "--with-" configure option using the lowercase | |
304 | dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and | |
305 | dnl PKG_CHECK_MODULES in a single macro. | |
306 | AC_DEFUN([PKG_WITH_MODULES], | |
307 | [ | |
308 | m4_pushdef([with_arg], m4_tolower([$1])) | |
309 | ||
310 | m4_pushdef([description], | |
311 | [m4_default([$5], [build with ]with_arg[ support])]) | |
312 | ||
313 | m4_pushdef([def_arg], [m4_default([$6], [auto])]) | |
314 | m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) | |
315 | m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) | |
316 | ||
317 | m4_case(def_arg, | |
318 | [yes],[m4_pushdef([with_without], [--without-]with_arg)], | |
319 | [m4_pushdef([with_without],[--with-]with_arg)]) | |
320 | ||
321 | AC_ARG_WITH(with_arg, | |
322 | AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, | |
323 | [AS_TR_SH([with_]with_arg)=def_arg]) | |
324 | ||
325 | AS_CASE([$AS_TR_SH([with_]with_arg)], | |
326 | [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], | |
327 | [auto],[PKG_CHECK_MODULES([$1],[$2], | |
328 | [m4_n([def_action_if_found]) $3], | |
329 | [m4_n([def_action_if_not_found]) $4])]) | |
330 | ||
331 | m4_popdef([with_arg]) | |
332 | m4_popdef([description]) | |
333 | m4_popdef([def_arg]) | |
334 | ||
335 | ])dnl PKG_WITH_MODULES | |
336 | ||
337 | dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, | |
338 | dnl [DESCRIPTION], [DEFAULT]) | |
339 | dnl ----------------------------------------------- | |
340 | dnl | |
341 | dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES | |
342 | dnl check._[VARIABLE-PREFIX] is exported as make variable. | |
343 | AC_DEFUN([PKG_HAVE_WITH_MODULES], | |
344 | [ | |
345 | PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) | |
346 | ||
347 | AM_CONDITIONAL([HAVE_][$1], | |
348 | [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) | |
349 | ])dnl PKG_HAVE_WITH_MODULES | |
350 | ||
351 | dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, | |
352 | dnl [DESCRIPTION], [DEFAULT]) | |
353 | dnl ------------------------------------------------------ | |
354 | dnl | |
355 | dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after | |
356 | dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make | |
357 | dnl and preprocessor variable. | |
358 | AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], | |
359 | [ | |
360 | PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) | |
361 | ||
362 | AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], | |
363 | [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) | |
364 | ])dnl PKG_HAVE_DEFINE_WITH_MODULES | |
365 | ||
366 | # Copyright (C) 2002-2020 Free Software Foundation, Inc. | |
367 | # | |
368 | # This file is free software; the Free Software Foundation | |
369 | # gives unlimited permission to copy and/or distribute it, | |
370 | # with or without modifications, as long as this notice is preserved. | |
371 | ||
372 | # AM_AUTOMAKE_VERSION(VERSION) | |
373 | # ---------------------------- | |
374 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | |
375 | # generated from the m4 files accompanying Automake X.Y. | |
376 | # (This private macro should not be called outside this file.) | |
377 | AC_DEFUN([AM_AUTOMAKE_VERSION], | |
378 | [am__api_version='1.16' | |
379 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | |
380 | dnl require some minimum version. Point them to the right macro. | |
381 | m4_if([$1], [1.16.2], [], | |
382 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | |
383 | ]) | |
384 | ||
385 | # _AM_AUTOCONF_VERSION(VERSION) | |
386 | # ----------------------------- | |
387 | # aclocal traces this macro to find the Autoconf version. | |
388 | # This is a private macro too. Using m4_define simplifies | |
389 | # the logic in aclocal, which can simply ignore this definition. | |
390 | m4_define([_AM_AUTOCONF_VERSION], []) | |
391 | ||
392 | # AM_SET_CURRENT_AUTOMAKE_VERSION | |
393 | # ------------------------------- | |
394 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | |
395 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | |
396 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | |
397 | [AM_AUTOMAKE_VERSION([1.16.2])dnl | |
398 | m4_ifndef([AC_AUTOCONF_VERSION], | |
399 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
400 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | |
401 | ||
402 | # Copyright (C) 2011-2020 Free Software Foundation, Inc. | |
403 | # | |
404 | # This file is free software; the Free Software Foundation | |
405 | # gives unlimited permission to copy and/or distribute it, | |
406 | # with or without modifications, as long as this notice is preserved. | |
407 | ||
408 | # AM_PROG_AR([ACT-IF-FAIL]) | |
409 | # ------------------------- | |
410 | # Try to determine the archiver interface, and trigger the ar-lib wrapper | |
411 | # if it is needed. If the detection of archiver interface fails, run | |
412 | # ACT-IF-FAIL (default is to abort configure with a proper error message). | |
413 | AC_DEFUN([AM_PROG_AR], | |
414 | [AC_BEFORE([$0], [LT_INIT])dnl | |
415 | AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl | |
416 | AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
417 | AC_REQUIRE_AUX_FILE([ar-lib])dnl | |
418 | AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) | |
419 | : ${AR=ar} | |
420 | ||
421 | AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], | |
422 | [AC_LANG_PUSH([C]) | |
423 | am_cv_ar_interface=ar | |
424 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], | |
425 | [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' | |
426 | AC_TRY_EVAL([am_ar_try]) | |
427 | if test "$ac_status" -eq 0; then | |
428 | am_cv_ar_interface=ar | |
429 | else | |
430 | am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' | |
431 | AC_TRY_EVAL([am_ar_try]) | |
432 | if test "$ac_status" -eq 0; then | |
433 | am_cv_ar_interface=lib | |
434 | else | |
435 | am_cv_ar_interface=unknown | |
436 | fi | |
437 | fi | |
438 | rm -f conftest.lib libconftest.a | |
439 | ]) | |
440 | AC_LANG_POP([C])]) | |
441 | ||
442 | case $am_cv_ar_interface in | |
443 | ar) | |
444 | ;; | |
445 | lib) | |
446 | # Microsoft lib, so override with the ar-lib wrapper script. | |
447 | # FIXME: It is wrong to rewrite AR. | |
448 | # But if we don't then we get into trouble of one sort or another. | |
449 | # A longer-term fix would be to have automake use am__AR in this case, | |
450 | # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something | |
451 | # similar. | |
452 | AR="$am_aux_dir/ar-lib $AR" | |
453 | ;; | |
454 | unknown) | |
455 | m4_default([$1], | |
456 | [AC_MSG_ERROR([could not determine $AR interface])]) | |
457 | ;; | |
458 | esac | |
459 | AC_SUBST([AR])dnl | |
460 | ]) | |
461 | ||
462 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | |
463 | ||
464 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
465 | # | |
466 | # This file is free software; the Free Software Foundation | |
467 | # gives unlimited permission to copy and/or distribute it, | |
468 | # with or without modifications, as long as this notice is preserved. | |
469 | ||
470 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | |
471 | # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to | |
472 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'. | |
473 | # | |
474 | # Of course, Automake must honor this variable whenever it calls a | |
475 | # tool from the auxiliary directory. The problem is that $srcdir (and | |
476 | # therefore $ac_aux_dir as well) can be either absolute or relative, | |
477 | # depending on how configure is run. This is pretty annoying, since | |
478 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | |
479 | # source directory, any form will work fine, but in subdirectories a | |
480 | # relative path needs to be adjusted first. | |
481 | # | |
482 | # $ac_aux_dir/missing | |
483 | # fails when called from a subdirectory if $ac_aux_dir is relative | |
484 | # $top_srcdir/$ac_aux_dir/missing | |
485 | # fails if $ac_aux_dir is absolute, | |
486 | # fails when called from a subdirectory in a VPATH build with | |
487 | # a relative $ac_aux_dir | |
488 | # | |
489 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | |
490 | # are both prefixed by $srcdir. In an in-source build this is usually | |
491 | # harmless because $srcdir is '.', but things will broke when you | |
492 | # start a VPATH build or use an absolute $srcdir. | |
493 | # | |
494 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | |
495 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: | |
496 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | |
497 | # and then we would define $MISSING as | |
498 | # MISSING="\${SHELL} $am_aux_dir/missing" | |
499 | # This will work as long as MISSING is not called from configure, because | |
500 | # unfortunately $(top_srcdir) has no meaning in configure. | |
501 | # However there are other variables, like CC, which are often used in | |
502 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | |
503 | # | |
504 | # Another solution, used here, is to always expand $ac_aux_dir to an | |
505 | # absolute PATH. The drawback is that using absolute paths prevent a | |
506 | # configured tree to be moved without reconfiguration. | |
507 | ||
508 | AC_DEFUN([AM_AUX_DIR_EXPAND], | |
509 | [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | |
510 | # Expand $ac_aux_dir to an absolute path. | |
511 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
512 | ]) | |
513 | ||
514 | # AM_CONDITIONAL -*- Autoconf -*- | |
515 | ||
516 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. | |
517 | # | |
518 | # This file is free software; the Free Software Foundation | |
519 | # gives unlimited permission to copy and/or distribute it, | |
520 | # with or without modifications, as long as this notice is preserved. | |
521 | ||
522 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | |
523 | # ------------------------------------- | |
524 | # Define a conditional. | |
525 | AC_DEFUN([AM_CONDITIONAL], | |
526 | [AC_PREREQ([2.52])dnl | |
527 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
528 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
529 | AC_SUBST([$1_TRUE])dnl | |
530 | AC_SUBST([$1_FALSE])dnl | |
531 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | |
532 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | |
533 | m4_define([_AM_COND_VALUE_$1], [$2])dnl | |
534 | if $2; then | |
535 | $1_TRUE= | |
536 | $1_FALSE='#' | |
537 | else | |
538 | $1_TRUE='#' | |
539 | $1_FALSE= | |
540 | fi | |
541 | AC_CONFIG_COMMANDS_PRE( | |
542 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
543 | AC_MSG_ERROR([[conditional "$1" was never defined. | |
544 | Usually this means the macro was only invoked conditionally.]]) | |
545 | fi])]) | |
546 | ||
547 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
548 | # | |
549 | # This file is free software; the Free Software Foundation | |
550 | # gives unlimited permission to copy and/or distribute it, | |
551 | # with or without modifications, as long as this notice is preserved. | |
552 | ||
553 | ||
554 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be | |
555 | # written in clear, in which case automake, when reading aclocal.m4, | |
556 | # will think it sees a *use*, and therefore will trigger all it's | |
557 | # C support machinery. Also note that it means that autoscan, seeing | |
558 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
559 | ||
560 | ||
561 | # _AM_DEPENDENCIES(NAME) | |
562 | # ---------------------- | |
563 | # See how the compiler implements dependency checking. | |
564 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". | |
565 | # We try a few techniques and use that to set a single cache variable. | |
566 | # | |
567 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | |
568 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | |
569 | # dependency, and given that the user is not expected to run this macro, | |
570 | # just rely on AC_PROG_CC. | |
571 | AC_DEFUN([_AM_DEPENDENCIES], | |
572 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | |
573 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | |
574 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | |
575 | AC_REQUIRE([AM_DEP_TRACK])dnl | |
576 | ||
577 | m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], | |
578 | [$1], [CXX], [depcc="$CXX" am_compiler_list=], | |
579 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | |
580 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], | |
581 | [$1], [UPC], [depcc="$UPC" am_compiler_list=], | |
582 | [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | |
583 | [depcc="$$1" am_compiler_list=]) | |
584 | ||
585 | AC_CACHE_CHECK([dependency style of $depcc], | |
586 | [am_cv_$1_dependencies_compiler_type], | |
587 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
588 | # We make a subdir and do the tests there. Otherwise we can end up | |
589 | # making bogus files that we don't know about and never remove. For | |
590 | # instance it was reported that on HP-UX the gcc test will end up | |
591 | # making a dummy file named 'D' -- because '-MD' means "put the output | |
592 | # in D". | |
593 | rm -rf conftest.dir | |
594 | mkdir conftest.dir | |
595 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
596 | # using a relative directory. | |
597 | cp "$am_depcomp" conftest.dir | |
598 | cd conftest.dir | |
599 | # We will build objects and dependencies in a subdirectory because | |
600 | # it helps to detect inapplicable dependency modes. For instance | |
601 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
602 | # side effect of compilation, but ICC will put the dependencies in | |
603 | # the current directory while Tru64 will put them in the object | |
604 | # directory. | |
605 | mkdir sub | |
606 | ||
607 | am_cv_$1_dependencies_compiler_type=none | |
608 | if test "$am_compiler_list" = ""; then | |
609 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | |
610 | fi | |
611 | am__universal=false | |
612 | m4_case([$1], [CC], | |
613 | [case " $depcc " in #( | |
614 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
615 | esac], | |
616 | [CXX], | |
617 | [case " $depcc " in #( | |
618 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
619 | esac]) | |
620 | ||
621 | for depmode in $am_compiler_list; do | |
622 | # Setup a source with many dependencies, because some compilers | |
623 | # like to wrap large dependency lists on column 80 (with \), and | |
624 | # we should not choose a depcomp mode which is confused by this. | |
625 | # | |
626 | # We need to recreate these files for each test, as the compiler may | |
627 | # overwrite some of them when testing with obscure command lines. | |
628 | # This happens at least with the AIX C compiler. | |
629 | : > sub/conftest.c | |
630 | for i in 1 2 3 4 5 6; do | |
631 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
632 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
633 | # Solaris 10 /bin/sh. | |
634 | echo '/* dummy */' > sub/conftst$i.h | |
635 | done | |
636 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
637 | ||
638 | # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
639 | # mode. It turns out that the SunPro C++ compiler does not properly | |
640 | # handle '-M -o', and we need to detect this. Also, some Intel | |
641 | # versions had trouble with output in subdirs. | |
642 | am__obj=sub/conftest.${OBJEXT-o} | |
643 | am__minus_obj="-o $am__obj" | |
644 | case $depmode in | |
645 | gcc) | |
646 | # This depmode causes a compiler race in universal mode. | |
647 | test "$am__universal" = false || continue | |
648 | ;; | |
649 | nosideeffect) | |
650 | # After this tag, mechanisms are not by side-effect, so they'll | |
651 | # only be used when explicitly requested. | |
652 | if test "x$enable_dependency_tracking" = xyes; then | |
653 | continue | |
654 | else | |
655 | break | |
656 | fi | |
657 | ;; | |
658 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
659 | # This compiler won't grok '-c -o', but also, the minuso test has | |
660 | # not run yet. These depmodes are late enough in the game, and | |
661 | # so weak that their functioning should not be impacted. | |
662 | am__obj=conftest.${OBJEXT-o} | |
663 | am__minus_obj= | |
664 | ;; | |
665 | none) break ;; | |
666 | esac | |
667 | if depmode=$depmode \ | |
668 | source=sub/conftest.c object=$am__obj \ | |
669 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
670 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
671 | >/dev/null 2>conftest.err && | |
672 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
673 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
674 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
675 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
676 | # icc doesn't choke on unknown options, it will just issue warnings | |
677 | # or remarks (even with -Werror). So we grep stderr for any message | |
678 | # that says an option was ignored or not supported. | |
679 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
680 | # icc: Command line warning: ignoring option '-M'; no argument required | |
681 | # The diagnosis changed in icc 8.0: | |
682 | # icc: Command line remark: option '-MP' not supported | |
683 | if (grep 'ignoring option' conftest.err || | |
684 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
685 | am_cv_$1_dependencies_compiler_type=$depmode | |
686 | break | |
687 | fi | |
688 | fi | |
689 | done | |
690 | ||
691 | cd .. | |
692 | rm -rf conftest.dir | |
693 | else | |
694 | am_cv_$1_dependencies_compiler_type=none | |
695 | fi | |
696 | ]) | |
697 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | |
698 | AM_CONDITIONAL([am__fastdep$1], [ | |
699 | test "x$enable_dependency_tracking" != xno \ | |
700 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | |
701 | ]) | |
702 | ||
703 | ||
704 | # AM_SET_DEPDIR | |
705 | # ------------- | |
706 | # Choose a directory name for dependency files. | |
707 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES. | |
708 | AC_DEFUN([AM_SET_DEPDIR], | |
709 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
710 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | |
711 | ]) | |
712 | ||
713 | ||
714 | # AM_DEP_TRACK | |
715 | # ------------ | |
716 | AC_DEFUN([AM_DEP_TRACK], | |
717 | [AC_ARG_ENABLE([dependency-tracking], [dnl | |
718 | AS_HELP_STRING( | |
719 | [--enable-dependency-tracking], | |
720 | [do not reject slow dependency extractors]) | |
721 | AS_HELP_STRING( | |
722 | [--disable-dependency-tracking], | |
723 | [speeds up one-time build])]) | |
724 | if test "x$enable_dependency_tracking" != xno; then | |
725 | am_depcomp="$ac_aux_dir/depcomp" | |
726 | AMDEPBACKSLASH='\' | |
727 | am__nodep='_no' | |
728 | fi | |
729 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | |
730 | AC_SUBST([AMDEPBACKSLASH])dnl | |
731 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | |
732 | AC_SUBST([am__nodep])dnl | |
733 | _AM_SUBST_NOTMAKE([am__nodep])dnl | |
734 | ]) | |
735 | ||
736 | # Generate code to set up dependency tracking. -*- Autoconf -*- | |
737 | ||
738 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
739 | # | |
740 | # This file is free software; the Free Software Foundation | |
741 | # gives unlimited permission to copy and/or distribute it, | |
742 | # with or without modifications, as long as this notice is preserved. | |
743 | ||
744 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | |
745 | # ------------------------------ | |
746 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |
747 | [{ | |
748 | # Older Autoconf quotes --file arguments for eval, but not when files | |
749 | # are listed without --file. Let's play safe and only enable the eval | |
750 | # if we detect the quoting. | |
751 | # TODO: see whether this extra hack can be removed once we start | |
752 | # requiring Autoconf 2.70 or later. | |
753 | AS_CASE([$CONFIG_FILES], | |
754 | [*\'*], [eval set x "$CONFIG_FILES"], | |
755 | [*], [set x $CONFIG_FILES]) | |
756 | shift | |
757 | # Used to flag and report bootstrapping failures. | |
758 | am_rc=0 | |
759 | for am_mf | |
760 | do | |
761 | # Strip MF so we end up with the name of the file. | |
762 | am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` | |
763 | # Check whether this is an Automake generated Makefile which includes | |
764 | # dependency-tracking related rules and includes. | |
765 | # Grep'ing the whole file directly is not great: AIX grep has a line | |
766 | # limit of 2048, but all sed's we know have understand at least 4000. | |
767 | sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ | |
768 | || continue | |
769 | am_dirpart=`AS_DIRNAME(["$am_mf"])` | |
770 | am_filepart=`AS_BASENAME(["$am_mf"])` | |
771 | AM_RUN_LOG([cd "$am_dirpart" \ | |
772 | && sed -e '/# am--include-marker/d' "$am_filepart" \ | |
773 | | $MAKE -f - am--depfiles]) || am_rc=$? | |
774 | done | |
775 | if test $am_rc -ne 0; then | |
776 | AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments | |
777 | for automatic dependency tracking. If GNU make was not used, consider | |
778 | re-running the configure script with MAKE="gmake" (or whatever is | |
779 | necessary). You can also try re-running configure with the | |
780 | '--disable-dependency-tracking' option to at least be able to build | |
781 | the package (albeit without support for automatic dependency tracking).]) | |
782 | fi | |
783 | AS_UNSET([am_dirpart]) | |
784 | AS_UNSET([am_filepart]) | |
785 | AS_UNSET([am_mf]) | |
786 | AS_UNSET([am_rc]) | |
787 | rm -f conftest-deps.mk | |
788 | } | |
789 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
790 | ||
791 | ||
792 | # AM_OUTPUT_DEPENDENCY_COMMANDS | |
793 | # ----------------------------- | |
794 | # This macro should only be invoked once -- use via AC_REQUIRE. | |
795 | # | |
796 | # This code is only required when automatic dependency tracking is enabled. | |
797 | # This creates each '.Po' and '.Plo' makefile fragment that we'll need in | |
798 | # order to bootstrap the dependency handling code. | |
799 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |
800 | [AC_CONFIG_COMMANDS([depfiles], | |
801 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | |
802 | [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) | |
803 | ||
804 | # Do all the work for Automake. -*- Autoconf -*- | |
805 | ||
806 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
807 | # | |
808 | # This file is free software; the Free Software Foundation | |
809 | # gives unlimited permission to copy and/or distribute it, | |
810 | # with or without modifications, as long as this notice is preserved. | |
811 | ||
812 | # This macro actually does too much. Some checks are only needed if | |
813 | # your package does certain things. But this isn't really a big deal. | |
814 | ||
815 | dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. | |
816 | m4_define([AC_PROG_CC], | |
817 | m4_defn([AC_PROG_CC]) | |
818 | [_AM_PROG_CC_C_O | |
819 | ]) | |
820 | ||
821 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | |
822 | # AM_INIT_AUTOMAKE([OPTIONS]) | |
823 | # ----------------------------------------------- | |
824 | # The call with PACKAGE and VERSION arguments is the old style | |
825 | # call (pre autoconf-2.50), which is being phased out. PACKAGE | |
826 | # and VERSION should now be passed to AC_INIT and removed from | |
827 | # the call to AM_INIT_AUTOMAKE. | |
828 | # We support both call styles for the transition. After | |
829 | # the next Automake release, Autoconf can make the AC_INIT | |
830 | # arguments mandatory, and then we can depend on a new Autoconf | |
831 | # release and drop the old call support. | |
832 | AC_DEFUN([AM_INIT_AUTOMAKE], | |
833 | [AC_PREREQ([2.65])dnl | |
834 | dnl Autoconf wants to disallow AM_ names. We explicitly allow | |
835 | dnl the ones we care about. | |
836 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | |
837 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
838 | AC_REQUIRE([AC_PROG_INSTALL])dnl | |
839 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
840 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
841 | # is not polluted with repeated "-I." | |
842 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | |
843 | # test to see if srcdir already configured | |
844 | if test -f $srcdir/config.status; then | |
845 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
846 | fi | |
847 | fi | |
848 | ||
849 | # test whether we have cygpath | |
850 | if test -z "$CYGPATH_W"; then | |
851 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
852 | CYGPATH_W='cygpath -w' | |
853 | else | |
854 | CYGPATH_W=echo | |
855 | fi | |
856 | fi | |
857 | AC_SUBST([CYGPATH_W]) | |
858 | ||
859 | # Define the identity of the package. | |
860 | dnl Distinguish between old-style and new-style calls. | |
861 | m4_ifval([$2], | |
862 | [AC_DIAGNOSE([obsolete], | |
863 | [$0: two- and three-arguments forms are deprecated.]) | |
864 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | |
865 | AC_SUBST([PACKAGE], [$1])dnl | |
866 | AC_SUBST([VERSION], [$2])], | |
867 | [_AM_SET_OPTIONS([$1])dnl | |
868 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | |
869 | m4_if( | |
870 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | |
871 | [ok:ok],, | |
872 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | |
873 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | |
874 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | |
875 | ||
876 | _AM_IF_OPTION([no-define],, | |
877 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) | |
878 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl | |
879 | ||
880 | # Some tools Automake needs. | |
881 | AC_REQUIRE([AM_SANITY_CHECK])dnl | |
882 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | |
883 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) | |
884 | AM_MISSING_PROG([AUTOCONF], [autoconf]) | |
885 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) | |
886 | AM_MISSING_PROG([AUTOHEADER], [autoheader]) | |
887 | AM_MISSING_PROG([MAKEINFO], [makeinfo]) | |
888 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
889 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | |
890 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | |
891 | # For better backward compatibility. To be removed once Automake 1.9.x | |
892 | # dies out for good. For more background, see: | |
893 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
894 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
895 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | |
896 | # We need awk for the "check" target (and possibly the TAP driver). The | |
897 | # system "awk" is bad on some platforms. | |
898 | AC_REQUIRE([AC_PROG_AWK])dnl | |
899 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
900 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
901 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | |
902 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | |
903 | [_AM_PROG_TAR([v7])])]) | |
904 | _AM_IF_OPTION([no-dependencies],, | |
905 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | |
906 | [_AM_DEPENDENCIES([CC])], | |
907 | [m4_define([AC_PROG_CC], | |
908 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl | |
909 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
910 | [_AM_DEPENDENCIES([CXX])], | |
911 | [m4_define([AC_PROG_CXX], | |
912 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl | |
913 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], | |
914 | [_AM_DEPENDENCIES([OBJC])], | |
915 | [m4_define([AC_PROG_OBJC], | |
916 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl | |
917 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], | |
918 | [_AM_DEPENDENCIES([OBJCXX])], | |
919 | [m4_define([AC_PROG_OBJCXX], | |
920 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl | |
921 | ]) | |
922 | AC_REQUIRE([AM_SILENT_RULES])dnl | |
923 | dnl The testsuite driver may need to know about EXEEXT, so add the | |
924 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This | |
925 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. | |
926 | AC_CONFIG_COMMANDS_PRE(dnl | |
927 | [m4_provide_if([_AM_COMPILER_EXEEXT], | |
928 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | |
929 | ||
930 | # POSIX will say in a future version that running "rm -f" with no argument | |
931 | # is OK; and we want to be able to make that assumption in our Makefile | |
932 | # recipes. So use an aggressive probe to check that the usage we want is | |
933 | # actually supported "in the wild" to an acceptable degree. | |
934 | # See automake bug#10828. | |
935 | # To make any issue more visible, cause the running configure to be aborted | |
936 | # by default if the 'rm' program in use doesn't match our expectations; the | |
937 | # user can still override this though. | |
938 | if rm -f && rm -fr && rm -rf; then : OK; else | |
939 | cat >&2 <<'END' | |
940 | Oops! | |
941 | ||
942 | Your 'rm' program seems unable to run without file operands specified | |
943 | on the command line, even when the '-f' option is present. This is contrary | |
944 | to the behaviour of most rm programs out there, and not conforming with | |
945 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
946 | ||
947 | Please tell bug-automake@gnu.org about your system, including the value | |
948 | of your $PATH and any error possibly output before this message. This | |
949 | can help us improve future automake versions. | |
950 | ||
951 | END | |
952 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
953 | echo 'Configuration will proceed anyway, since you have set the' >&2 | |
954 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
955 | echo >&2 | |
956 | else | |
957 | cat >&2 <<'END' | |
958 | Aborting the configuration process, to ensure you take notice of the issue. | |
959 | ||
960 | You can download and install GNU coreutils to get an 'rm' implementation | |
961 | that behaves properly: <https://www.gnu.org/software/coreutils/>. | |
962 | ||
963 | If you want to complete the configuration process using your problematic | |
964 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
965 | to "yes", and re-run configure. | |
966 | ||
967 | END | |
968 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) | |
969 | fi | |
970 | fi | |
971 | dnl The trailing newline in this macro's definition is deliberate, for | |
972 | dnl backward compatibility and to allow trailing 'dnl'-style comments | |
973 | dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. | |
974 | ]) | |
975 | ||
976 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | |
977 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | |
978 | dnl mangled by Autoconf and run in a shell conditional statement. | |
979 | m4_define([_AC_COMPILER_EXEEXT], | |
980 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | |
981 | ||
982 | # When config.status generates a header, we must update the stamp-h file. | |
983 | # This file resides in the same directory as the config header | |
984 | # that is generated. The stamp files are numbered to have different names. | |
985 | ||
986 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | |
987 | # loop where config.status creates the headers, so we can generate | |
988 | # our stamp files there. | |
989 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | |
990 | [# Compute $1's index in $config_headers. | |
991 | _am_arg=$1 | |
992 | _am_stamp_count=1 | |
993 | for _am_header in $config_headers :; do | |
994 | case $_am_header in | |
995 | $_am_arg | $_am_arg:* ) | |
996 | break ;; | |
997 | * ) | |
998 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
999 | esac | |
1000 | done | |
1001 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | |
1002 | ||
1003 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
1004 | # | |
1005 | # This file is free software; the Free Software Foundation | |
1006 | # gives unlimited permission to copy and/or distribute it, | |
1007 | # with or without modifications, as long as this notice is preserved. | |
1008 | ||
1009 | # AM_PROG_INSTALL_SH | |
1010 | # ------------------ | |
1011 | # Define $install_sh. | |
1012 | AC_DEFUN([AM_PROG_INSTALL_SH], | |
1013 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
1014 | if test x"${install_sh+set}" != xset; then | |
1015 | case $am_aux_dir in | |
1016 | *\ * | *\ *) | |
1017 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
1018 | *) | |
1019 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
1020 | esac | |
1021 | fi | |
1022 | AC_SUBST([install_sh])]) | |
1023 | ||
1024 | # Copyright (C) 2003-2020 Free Software Foundation, Inc. | |
1025 | # | |
1026 | # This file is free software; the Free Software Foundation | |
1027 | # gives unlimited permission to copy and/or distribute it, | |
1028 | # with or without modifications, as long as this notice is preserved. | |
1029 | ||
1030 | # Check whether the underlying file-system supports filenames | |
1031 | # with a leading dot. For instance MS-DOS doesn't. | |
1032 | AC_DEFUN([AM_SET_LEADING_DOT], | |
1033 | [rm -rf .tst 2>/dev/null | |
1034 | mkdir .tst 2>/dev/null | |
1035 | if test -d .tst; then | |
1036 | am__leading_dot=. | |
1037 | else | |
1038 | am__leading_dot=_ | |
1039 | fi | |
1040 | rmdir .tst 2>/dev/null | |
1041 | AC_SUBST([am__leading_dot])]) | |
1042 | ||
1043 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- | |
1044 | # From Jim Meyering | |
1045 | ||
1046 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
1047 | # | |
1048 | # This file is free software; the Free Software Foundation | |
1049 | # gives unlimited permission to copy and/or distribute it, | |
1050 | # with or without modifications, as long as this notice is preserved. | |
1051 | ||
1052 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) | |
1053 | # ---------------------------------- | |
1054 | # Control maintainer-specific portions of Makefiles. | |
1055 | # Default is to disable them, unless 'enable' is passed literally. | |
1056 | # For symmetry, 'disable' may be passed as well. Anyway, the user | |
1057 | # can override the default with the --enable/--disable switch. | |
1058 | AC_DEFUN([AM_MAINTAINER_MODE], | |
1059 | [m4_case(m4_default([$1], [disable]), | |
1060 | [enable], [m4_define([am_maintainer_other], [disable])], | |
1061 | [disable], [m4_define([am_maintainer_other], [enable])], | |
1062 | [m4_define([am_maintainer_other], [enable]) | |
1063 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) | |
1064 | AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |
1065 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed | |
1066 | AC_ARG_ENABLE([maintainer-mode], | |
1067 | [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], | |
1068 | am_maintainer_other[ make rules and dependencies not useful | |
1069 | (and sometimes confusing) to the casual installer])], | |
1070 | [USE_MAINTAINER_MODE=$enableval], | |
1071 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) | |
1072 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) | |
1073 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) | |
1074 | MAINT=$MAINTAINER_MODE_TRUE | |
1075 | AC_SUBST([MAINT])dnl | |
1076 | ] | |
1077 | ) | |
1078 | ||
1079 | # Check to see how 'make' treats includes. -*- Autoconf -*- | |
1080 | ||
1081 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
1082 | # | |
1083 | # This file is free software; the Free Software Foundation | |
1084 | # gives unlimited permission to copy and/or distribute it, | |
1085 | # with or without modifications, as long as this notice is preserved. | |
1086 | ||
1087 | # AM_MAKE_INCLUDE() | |
1088 | # ----------------- | |
1089 | # Check whether make has an 'include' directive that can support all | |
1090 | # the idioms we need for our automatic dependency tracking code. | |
1091 | AC_DEFUN([AM_MAKE_INCLUDE], | |
1092 | [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) | |
1093 | cat > confinc.mk << 'END' | |
1094 | am__doit: | |
1095 | @echo this is the am__doit target >confinc.out | |
1096 | .PHONY: am__doit | |
1097 | END | |
1098 | am__include="#" | |
1099 | am__quote= | |
1100 | # BSD make does it like this. | |
1101 | echo '.include "confinc.mk" # ignored' > confmf.BSD | |
1102 | # Other make implementations (GNU, Solaris 10, AIX) do it like this. | |
1103 | echo 'include confinc.mk # ignored' > confmf.GNU | |
1104 | _am_result=no | |
1105 | for s in GNU BSD; do | |
1106 | AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) | |
1107 | AS_CASE([$?:`cat confinc.out 2>/dev/null`], | |
1108 | ['0:this is the am__doit target'], | |
1109 | [AS_CASE([$s], | |
1110 | [BSD], [am__include='.include' am__quote='"'], | |
1111 | [am__include='include' am__quote=''])]) | |
1112 | if test "$am__include" != "#"; then | |
1113 | _am_result="yes ($s style)" | |
1114 | break | |
1115 | fi | |
1116 | done | |
1117 | rm -f confinc.* confmf.* | |
1118 | AC_MSG_RESULT([${_am_result}]) | |
1119 | AC_SUBST([am__include])]) | |
1120 | AC_SUBST([am__quote])]) | |
1121 | ||
1122 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | |
1123 | ||
1124 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. | |
1125 | # | |
1126 | # This file is free software; the Free Software Foundation | |
1127 | # gives unlimited permission to copy and/or distribute it, | |
1128 | # with or without modifications, as long as this notice is preserved. | |
1129 | ||
1130 | # AM_MISSING_PROG(NAME, PROGRAM) | |
1131 | # ------------------------------ | |
1132 | AC_DEFUN([AM_MISSING_PROG], | |
1133 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | |
1134 | $1=${$1-"${am_missing_run}$2"} | |
1135 | AC_SUBST($1)]) | |
1136 | ||
1137 | # AM_MISSING_HAS_RUN | |
1138 | # ------------------ | |
1139 | # Define MISSING if not defined so far and test if it is modern enough. | |
1140 | # If it is, set am_missing_run to use it, otherwise, to nothing. | |
1141 | AC_DEFUN([AM_MISSING_HAS_RUN], | |
1142 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
1143 | AC_REQUIRE_AUX_FILE([missing])dnl | |
1144 | if test x"${MISSING+set}" != xset; then | |
1145 | case $am_aux_dir in | |
1146 | *\ * | *\ *) | |
1147 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
1148 | *) | |
1149 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
1150 | esac | |
1151 | fi | |
1152 | # Use eval to expand $SHELL | |
1153 | if eval "$MISSING --is-lightweight"; then | |
1154 | am_missing_run="$MISSING " | |
1155 | else | |
1156 | am_missing_run= | |
1157 | AC_MSG_WARN(['missing' script is too old or missing]) | |
1158 | fi | |
1159 | ]) | |
1160 | ||
1161 | # Helper functions for option handling. -*- Autoconf -*- | |
1162 | ||
1163 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
1164 | # | |
1165 | # This file is free software; the Free Software Foundation | |
1166 | # gives unlimited permission to copy and/or distribute it, | |
1167 | # with or without modifications, as long as this notice is preserved. | |
1168 | ||
1169 | # _AM_MANGLE_OPTION(NAME) | |
1170 | # ----------------------- | |
1171 | AC_DEFUN([_AM_MANGLE_OPTION], | |
1172 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | |
1173 | ||
1174 | # _AM_SET_OPTION(NAME) | |
1175 | # -------------------- | |
1176 | # Set option NAME. Presently that only means defining a flag for this option. | |
1177 | AC_DEFUN([_AM_SET_OPTION], | |
1178 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) | |
1179 | ||
1180 | # _AM_SET_OPTIONS(OPTIONS) | |
1181 | # ------------------------ | |
1182 | # OPTIONS is a space-separated list of Automake options. | |
1183 | AC_DEFUN([_AM_SET_OPTIONS], | |
1184 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | |
1185 | ||
1186 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | |
1187 | # ------------------------------------------- | |
1188 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
1189 | AC_DEFUN([_AM_IF_OPTION], | |
1190 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | |
1191 | ||
1192 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
1193 | # | |
1194 | # This file is free software; the Free Software Foundation | |
1195 | # gives unlimited permission to copy and/or distribute it, | |
1196 | # with or without modifications, as long as this notice is preserved. | |
1197 | ||
1198 | # _AM_PROG_CC_C_O | |
1199 | # --------------- | |
1200 | # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC | |
1201 | # to automatically call this. | |
1202 | AC_DEFUN([_AM_PROG_CC_C_O], | |
1203 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
1204 | AC_REQUIRE_AUX_FILE([compile])dnl | |
1205 | AC_LANG_PUSH([C])dnl | |
1206 | AC_CACHE_CHECK( | |
1207 | [whether $CC understands -c and -o together], | |
1208 | [am_cv_prog_cc_c_o], | |
1209 | [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) | |
1210 | # Make sure it works both with $CC and with simple cc. | |
1211 | # Following AC_PROG_CC_C_O, we do the test twice because some | |
1212 | # compilers refuse to overwrite an existing .o file with -o, | |
1213 | # though they will create one. | |
1214 | am_cv_prog_cc_c_o=yes | |
1215 | for am_i in 1 2; do | |
1216 | if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ | |
1217 | && test -f conftest2.$ac_objext; then | |
1218 | : OK | |
1219 | else | |
1220 | am_cv_prog_cc_c_o=no | |
1221 | break | |
1222 | fi | |
1223 | done | |
1224 | rm -f core conftest* | |
1225 | unset am_i]) | |
1226 | if test "$am_cv_prog_cc_c_o" != yes; then | |
1227 | # Losing compiler, so override with the script. | |
1228 | # FIXME: It is wrong to rewrite CC. | |
1229 | # But if we don't then we get into trouble of one sort or another. | |
1230 | # A longer-term fix would be to have automake use am__CC in this case, | |
1231 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
1232 | CC="$am_aux_dir/compile $CC" | |
1233 | fi | |
1234 | AC_LANG_POP([C])]) | |
1235 | ||
1236 | # For backward compatibility. | |
1237 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | |
1238 | ||
1239 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
1240 | # | |
1241 | # This file is free software; the Free Software Foundation | |
1242 | # gives unlimited permission to copy and/or distribute it, | |
1243 | # with or without modifications, as long as this notice is preserved. | |
1244 | ||
1245 | # AM_RUN_LOG(COMMAND) | |
1246 | # ------------------- | |
1247 | # Run COMMAND, save the exit status in ac_status, and log it. | |
1248 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) | |
1249 | AC_DEFUN([AM_RUN_LOG], | |
1250 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD | |
1251 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD | |
1252 | ac_status=$? | |
1253 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
1254 | (exit $ac_status); }]) | |
1255 | ||
1256 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | |
1257 | ||
1258 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
1259 | # | |
1260 | # This file is free software; the Free Software Foundation | |
1261 | # gives unlimited permission to copy and/or distribute it, | |
1262 | # with or without modifications, as long as this notice is preserved. | |
1263 | ||
1264 | # AM_SANITY_CHECK | |
1265 | # --------------- | |
1266 | AC_DEFUN([AM_SANITY_CHECK], | |
1267 | [AC_MSG_CHECKING([whether build environment is sane]) | |
1268 | # Reject unsafe characters in $srcdir or the absolute working directory | |
1269 | # name. Accept space and tab only in the latter. | |
1270 | am_lf=' | |
1271 | ' | |
1272 | case `pwd` in | |
1273 | *[[\\\"\#\$\&\'\`$am_lf]]*) | |
1274 | AC_MSG_ERROR([unsafe absolute working directory name]);; | |
1275 | esac | |
1276 | case $srcdir in | |
1277 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | |
1278 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; | |
1279 | esac | |
1280 | ||
1281 | # Do 'set' in a subshell so we don't clobber the current shell's | |
1282 | # arguments. Must try -L first in case configure is actually a | |
1283 | # symlink; some systems play weird games with the mod time of symlinks | |
1284 | # (eg FreeBSD returns the mod time of the symlink's containing | |
1285 | # directory). | |
1286 | if ( | |
1287 | am_has_slept=no | |
1288 | for am_try in 1 2; do | |
1289 | echo "timestamp, slept: $am_has_slept" > conftest.file | |
1290 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
1291 | if test "$[*]" = "X"; then | |
1292 | # -L didn't work. | |
1293 | set X `ls -t "$srcdir/configure" conftest.file` | |
1294 | fi | |
1295 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
1296 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | |
1297 | ||
1298 | # If neither matched, then we have a broken ls. This can happen | |
1299 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
1300 | # broken ls alias from the environment. This has actually | |
1301 | # happened. Such a system could not be considered "sane". | |
1302 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
1303 | alias in your environment]) | |
1304 | fi | |
1305 | if test "$[2]" = conftest.file || test $am_try -eq 2; then | |
1306 | break | |
1307 | fi | |
1308 | # Just in case. | |
1309 | sleep 1 | |
1310 | am_has_slept=yes | |
1311 | done | |
1312 | test "$[2]" = conftest.file | |
1313 | ) | |
1314 | then | |
1315 | # Ok. | |
1316 | : | |
1317 | else | |
1318 | AC_MSG_ERROR([newly created file is older than distributed files! | |
1319 | Check your system clock]) | |
1320 | fi | |
1321 | AC_MSG_RESULT([yes]) | |
1322 | # If we didn't sleep, we still need to ensure time stamps of config.status and | |
1323 | # generated files are strictly newer. | |
1324 | am_sleep_pid= | |
1325 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
1326 | ( sleep 1 ) & | |
1327 | am_sleep_pid=$! | |
1328 | fi | |
1329 | AC_CONFIG_COMMANDS_PRE( | |
1330 | [AC_MSG_CHECKING([that generated files are newer than configure]) | |
1331 | if test -n "$am_sleep_pid"; then | |
1332 | # Hide warnings about reused PIDs. | |
1333 | wait $am_sleep_pid 2>/dev/null | |
1334 | fi | |
1335 | AC_MSG_RESULT([done])]) | |
1336 | rm -f conftest.file | |
1337 | ]) | |
1338 | ||
1339 | # Copyright (C) 2009-2020 Free Software Foundation, Inc. | |
1340 | # | |
1341 | # This file is free software; the Free Software Foundation | |
1342 | # gives unlimited permission to copy and/or distribute it, | |
1343 | # with or without modifications, as long as this notice is preserved. | |
1344 | ||
1345 | # AM_SILENT_RULES([DEFAULT]) | |
1346 | # -------------------------- | |
1347 | # Enable less verbose build rules; with the default set to DEFAULT | |
1348 | # ("yes" being less verbose, "no" or empty being verbose). | |
1349 | AC_DEFUN([AM_SILENT_RULES], | |
1350 | [AC_ARG_ENABLE([silent-rules], [dnl | |
1351 | AS_HELP_STRING( | |
1352 | [--enable-silent-rules], | |
1353 | [less verbose build output (undo: "make V=1")]) | |
1354 | AS_HELP_STRING( | |
1355 | [--disable-silent-rules], | |
1356 | [verbose build output (undo: "make V=0")])dnl | |
1357 | ]) | |
1358 | case $enable_silent_rules in @%:@ ((( | |
1359 | yes) AM_DEFAULT_VERBOSITY=0;; | |
1360 | no) AM_DEFAULT_VERBOSITY=1;; | |
1361 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; | |
1362 | esac | |
1363 | dnl | |
1364 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep) | |
1365 | dnl do not support nested variable expansions. | |
1366 | dnl See automake bug#9928 and bug#10237. | |
1367 | am_make=${MAKE-make} | |
1368 | AC_CACHE_CHECK([whether $am_make supports nested variables], | |
1369 | [am_cv_make_support_nested_variables], | |
1370 | [if AS_ECHO([['TRUE=$(BAR$(V)) | |
1371 | BAR0=false | |
1372 | BAR1=true | |
1373 | V=1 | |
1374 | am__doit: | |
1375 | @$(TRUE) | |
1376 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then | |
1377 | am_cv_make_support_nested_variables=yes | |
1378 | else | |
1379 | am_cv_make_support_nested_variables=no | |
1380 | fi]) | |
1381 | if test $am_cv_make_support_nested_variables = yes; then | |
1382 | dnl Using '$V' instead of '$(V)' breaks IRIX make. | |
1383 | AM_V='$(V)' | |
1384 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
1385 | else | |
1386 | AM_V=$AM_DEFAULT_VERBOSITY | |
1387 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
1388 | fi | |
1389 | AC_SUBST([AM_V])dnl | |
1390 | AM_SUBST_NOTMAKE([AM_V])dnl | |
1391 | AC_SUBST([AM_DEFAULT_V])dnl | |
1392 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl | |
1393 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl | |
1394 | AM_BACKSLASH='\' | |
1395 | AC_SUBST([AM_BACKSLASH])dnl | |
1396 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | |
1397 | ]) | |
1398 | ||
1399 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
1400 | # | |
1401 | # This file is free software; the Free Software Foundation | |
1402 | # gives unlimited permission to copy and/or distribute it, | |
1403 | # with or without modifications, as long as this notice is preserved. | |
1404 | ||
1405 | # AM_PROG_INSTALL_STRIP | |
1406 | # --------------------- | |
1407 | # One issue with vendor 'install' (even GNU) is that you can't | |
1408 | # specify the program used to strip binaries. This is especially | |
1409 | # annoying in cross-compiling environments, where the build's strip | |
1410 | # is unlikely to handle the host's binaries. | |
1411 | # Fortunately install-sh will honor a STRIPPROG variable, so we | |
1412 | # always use install-sh in "make install-strip", and initialize | |
1413 | # STRIPPROG with the value of the STRIP variable (set by the user). | |
1414 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | |
1415 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
1416 | # Installed binaries are usually stripped using 'strip' when the user | |
1417 | # run "make install-strip". However 'strip' might not be the right | |
1418 | # tool to use in cross-compilation environments, therefore Automake | |
1419 | # will honor the 'STRIP' environment variable to overrule this program. | |
1420 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. | |
1421 | if test "$cross_compiling" != no; then | |
1422 | AC_CHECK_TOOL([STRIP], [strip], :) | |
1423 | fi | |
1424 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
1425 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | |
1426 | ||
1427 | # Copyright (C) 2006-2020 Free Software Foundation, Inc. | |
1428 | # | |
1429 | # This file is free software; the Free Software Foundation | |
1430 | # gives unlimited permission to copy and/or distribute it, | |
1431 | # with or without modifications, as long as this notice is preserved. | |
1432 | ||
1433 | # _AM_SUBST_NOTMAKE(VARIABLE) | |
1434 | # --------------------------- | |
1435 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | |
1436 | # This macro is traced by Automake. | |
1437 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | |
1438 | ||
1439 | # AM_SUBST_NOTMAKE(VARIABLE) | |
1440 | # -------------------------- | |
1441 | # Public sister of _AM_SUBST_NOTMAKE. | |
1442 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |
1443 | ||
1444 | # Check how to create a tarball. -*- Autoconf -*- | |
1445 | ||
1446 | # Copyright (C) 2004-2020 Free Software Foundation, Inc. | |
1447 | # | |
1448 | # This file is free software; the Free Software Foundation | |
1449 | # gives unlimited permission to copy and/or distribute it, | |
1450 | # with or without modifications, as long as this notice is preserved. | |
1451 | ||
1452 | # _AM_PROG_TAR(FORMAT) | |
1453 | # -------------------- | |
1454 | # Check how to create a tarball in format FORMAT. | |
1455 | # FORMAT should be one of 'v7', 'ustar', or 'pax'. | |
1456 | # | |
1457 | # Substitute a variable $(am__tar) that is a command | |
1458 | # writing to stdout a FORMAT-tarball containing the directory | |
1459 | # $tardir. | |
1460 | # tardir=directory && $(am__tar) > result.tar | |
1461 | # | |
1462 | # Substitute a variable $(am__untar) that extract such | |
1463 | # a tarball read from stdin. | |
1464 | # $(am__untar) < result.tar | |
1465 | # | |
1466 | AC_DEFUN([_AM_PROG_TAR], | |
1467 | [# Always define AMTAR for backward compatibility. Yes, it's still used | |
1468 | # in the wild :-( We should find a proper way to deprecate it ... | |
1469 | AC_SUBST([AMTAR], ['$${TAR-tar}']) | |
1470 | ||
1471 | # We'll loop over all known methods to create a tar archive until one works. | |
1472 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | |
1473 | ||
1474 | m4_if([$1], [v7], | |
1475 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], | |
1476 | ||
1477 | [m4_case([$1], | |
1478 | [ustar], | |
1479 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields. | |
1480 | # There is notably a 21 bits limit for the UID and the GID. In fact, | |
1481 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 | |
1482 | # and bug#13588). | |
1483 | am_max_uid=2097151 # 2^21 - 1 | |
1484 | am_max_gid=$am_max_uid | |
1485 | # The $UID and $GID variables are not portable, so we need to resort | |
1486 | # to the POSIX-mandated id(1) utility. Errors in the 'id' calls | |
1487 | # below are definitely unexpected, so allow the users to see them | |
1488 | # (that is, avoid stderr redirection). | |
1489 | am_uid=`id -u || echo unknown` | |
1490 | am_gid=`id -g || echo unknown` | |
1491 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) | |
1492 | if test $am_uid -le $am_max_uid; then | |
1493 | AC_MSG_RESULT([yes]) | |
1494 | else | |
1495 | AC_MSG_RESULT([no]) | |
1496 | _am_tools=none | |
1497 | fi | |
1498 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) | |
1499 | if test $am_gid -le $am_max_gid; then | |
1500 | AC_MSG_RESULT([yes]) | |
1501 | else | |
1502 | AC_MSG_RESULT([no]) | |
1503 | _am_tools=none | |
1504 | fi], | |
1505 | ||
1506 | [pax], | |
1507 | [], | |
1508 | ||
1509 | [m4_fatal([Unknown tar format])]) | |
1510 | ||
1511 | AC_MSG_CHECKING([how to create a $1 tar archive]) | |
1512 | ||
1513 | # Go ahead even if we have the value already cached. We do so because we | |
1514 | # need to set the values for the 'am__tar' and 'am__untar' variables. | |
1515 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | |
1516 | ||
1517 | for _am_tool in $_am_tools; do | |
1518 | case $_am_tool in | |
1519 | gnutar) | |
1520 | for _am_tar in tar gnutar gtar; do | |
1521 | AM_RUN_LOG([$_am_tar --version]) && break | |
1522 | done | |
1523 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | |
1524 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | |
1525 | am__untar="$_am_tar -xf -" | |
1526 | ;; | |
1527 | plaintar) | |
1528 | # Must skip GNU tar: if it does not support --format= it doesn't create | |
1529 | # ustar tarball either. | |
1530 | (tar --version) >/dev/null 2>&1 && continue | |
1531 | am__tar='tar chf - "$$tardir"' | |
1532 | am__tar_='tar chf - "$tardir"' | |
1533 | am__untar='tar xf -' | |
1534 | ;; | |
1535 | pax) | |
1536 | am__tar='pax -L -x $1 -w "$$tardir"' | |
1537 | am__tar_='pax -L -x $1 -w "$tardir"' | |
1538 | am__untar='pax -r' | |
1539 | ;; | |
1540 | cpio) | |
1541 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | |
1542 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | |
1543 | am__untar='cpio -i -H $1 -d' | |
1544 | ;; | |
1545 | none) | |
1546 | am__tar=false | |
1547 | am__tar_=false | |
1548 | am__untar=false | |
1549 | ;; | |
1550 | esac | |
1551 | ||
1552 | # If the value was cached, stop now. We just wanted to have am__tar | |
1553 | # and am__untar set. | |
1554 | test -n "${am_cv_prog_tar_$1}" && break | |
1555 | ||
1556 | # tar/untar a dummy directory, and stop if the command works. | |
1557 | rm -rf conftest.dir | |
1558 | mkdir conftest.dir | |
1559 | echo GrepMe > conftest.dir/file | |
1560 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | |
1561 | rm -rf conftest.dir | |
1562 | if test -s conftest.tar; then | |
1563 | AM_RUN_LOG([$am__untar <conftest.tar]) | |
1564 | AM_RUN_LOG([cat conftest.dir/file]) | |
1565 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | |
1566 | fi | |
1567 | done | |
1568 | rm -rf conftest.dir | |
1569 | ||
1570 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | |
1571 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | |
1572 | ||
1573 | AC_SUBST([am__tar]) | |
1574 | AC_SUBST([am__untar]) | |
1575 | ]) # _AM_PROG_TAR | |
1576 | ||
1577 | m4_include([m4/ax_append_flag.m4]) | |
1578 | m4_include([m4/ax_cflags_warn_all.m4]) | |
1579 | m4_include([m4/ax_check_compile_flag.m4]) | |
1580 | m4_include([m4/ax_check_enable_debug.m4]) | |
1581 | m4_include([m4/ax_check_gnu_make.m4]) | |
1582 | m4_include([m4/ax_check_link_flag.m4]) | |
1583 | m4_include([m4/ax_code_coverage.m4]) | |
1584 | m4_include([m4/ax_configure_args.m4]) | |
1585 | m4_include([m4/ax_enable_builddir.m4]) | |
1586 | m4_include([m4/ax_extend_srcdir.m4]) | |
1587 | m4_include([m4/ax_require_defined.m4]) | |
1588 | m4_include([m4/ax_sanitizers.m4]) |
0 | #! /bin/sh | |
1 | # Wrapper for Microsoft lib.exe | |
2 | ||
3 | me=ar-lib | |
4 | scriptversion=2019-07-04.01; # UTC | |
5 | ||
6 | # Copyright (C) 2010-2020 Free Software Foundation, Inc. | |
7 | # Written by Peter Rosin <peda@lysator.liu.se>. | |
8 | # | |
9 | # This program is free software; you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License as published by | |
11 | # the Free Software Foundation; either version 2, or (at your option) | |
12 | # any later version. | |
13 | # | |
14 | # This program is distributed in the hope that it will be useful, | |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
18 | # | |
19 | # You should have received a copy of the GNU General Public License | |
20 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | |
21 | ||
22 | # As a special exception to the GNU General Public License, if you | |
23 | # distribute this file as part of a program that contains a | |
24 | # configuration script generated by Autoconf, you may include it under | |
25 | # the same distribution terms that you use for the rest of that program. | |
26 | ||
27 | # This file is maintained in Automake, please report | |
28 | # bugs to <bug-automake@gnu.org> or send patches to | |
29 | # <automake-patches@gnu.org>. | |
30 | ||
31 | ||
32 | # func_error message | |
33 | func_error () | |
34 | { | |
35 | echo "$me: $1" 1>&2 | |
36 | exit 1 | |
37 | } | |
38 | ||
39 | file_conv= | |
40 | ||
41 | # func_file_conv build_file | |
42 | # Convert a $build file to $host form and store it in $file | |
43 | # Currently only supports Windows hosts. | |
44 | func_file_conv () | |
45 | { | |
46 | file=$1 | |
47 | case $file in | |
48 | / | /[!/]*) # absolute file, and not a UNC file | |
49 | if test -z "$file_conv"; then | |
50 | # lazily determine how to convert abs files | |
51 | case `uname -s` in | |
52 | MINGW*) | |
53 | file_conv=mingw | |
54 | ;; | |
55 | CYGWIN* | MSYS*) | |
56 | file_conv=cygwin | |
57 | ;; | |
58 | *) | |
59 | file_conv=wine | |
60 | ;; | |
61 | esac | |
62 | fi | |
63 | case $file_conv in | |
64 | mingw) | |
65 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` | |
66 | ;; | |
67 | cygwin | msys) | |
68 | file=`cygpath -m "$file" || echo "$file"` | |
69 | ;; | |
70 | wine) | |
71 | file=`winepath -w "$file" || echo "$file"` | |
72 | ;; | |
73 | esac | |
74 | ;; | |
75 | esac | |
76 | } | |
77 | ||
78 | # func_at_file at_file operation archive | |
79 | # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE | |
80 | # for each of them. | |
81 | # When interpreting the content of the @FILE, do NOT use func_file_conv, | |
82 | # since the user would need to supply preconverted file names to | |
83 | # binutils ar, at least for MinGW. | |
84 | func_at_file () | |
85 | { | |
86 | operation=$2 | |
87 | archive=$3 | |
88 | at_file_contents=`cat "$1"` | |
89 | eval set x "$at_file_contents" | |
90 | shift | |
91 | ||
92 | for member | |
93 | do | |
94 | $AR -NOLOGO $operation:"$member" "$archive" || exit $? | |
95 | done | |
96 | } | |
97 | ||
98 | case $1 in | |
99 | '') | |
100 | func_error "no command. Try '$0 --help' for more information." | |
101 | ;; | |
102 | -h | --h*) | |
103 | cat <<EOF | |
104 | Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...] | |
105 | ||
106 | Members may be specified in a file named with @FILE. | |
107 | EOF | |
108 | exit $? | |
109 | ;; | |
110 | -v | --v*) | |
111 | echo "$me, version $scriptversion" | |
112 | exit $? | |
113 | ;; | |
114 | esac | |
115 | ||
116 | if test $# -lt 3; then | |
117 | func_error "you must specify a program, an action and an archive" | |
118 | fi | |
119 | ||
120 | AR=$1 | |
121 | shift | |
122 | while : | |
123 | do | |
124 | if test $# -lt 2; then | |
125 | func_error "you must specify a program, an action and an archive" | |
126 | fi | |
127 | case $1 in | |
128 | -lib | -LIB \ | |
129 | | -ltcg | -LTCG \ | |
130 | | -machine* | -MACHINE* \ | |
131 | | -subsystem* | -SUBSYSTEM* \ | |
132 | | -verbose | -VERBOSE \ | |
133 | | -wx* | -WX* ) | |
134 | AR="$AR $1" | |
135 | shift | |
136 | ;; | |
137 | *) | |
138 | action=$1 | |
139 | shift | |
140 | break | |
141 | ;; | |
142 | esac | |
143 | done | |
144 | orig_archive=$1 | |
145 | shift | |
146 | func_file_conv "$orig_archive" | |
147 | archive=$file | |
148 | ||
149 | # strip leading dash in $action | |
150 | action=${action#-} | |
151 | ||
152 | delete= | |
153 | extract= | |
154 | list= | |
155 | quick= | |
156 | replace= | |
157 | index= | |
158 | create= | |
159 | ||
160 | while test -n "$action" | |
161 | do | |
162 | case $action in | |
163 | d*) delete=yes ;; | |
164 | x*) extract=yes ;; | |
165 | t*) list=yes ;; | |
166 | q*) quick=yes ;; | |
167 | r*) replace=yes ;; | |
168 | s*) index=yes ;; | |
169 | S*) ;; # the index is always updated implicitly | |
170 | c*) create=yes ;; | |
171 | u*) ;; # TODO: don't ignore the update modifier | |
172 | v*) ;; # TODO: don't ignore the verbose modifier | |
173 | *) | |
174 | func_error "unknown action specified" | |
175 | ;; | |
176 | esac | |
177 | action=${action#?} | |
178 | done | |
179 | ||
180 | case $delete$extract$list$quick$replace,$index in | |
181 | yes,* | ,yes) | |
182 | ;; | |
183 | yesyes*) | |
184 | func_error "more than one action specified" | |
185 | ;; | |
186 | *) | |
187 | func_error "no action specified" | |
188 | ;; | |
189 | esac | |
190 | ||
191 | if test -n "$delete"; then | |
192 | if test ! -f "$orig_archive"; then | |
193 | func_error "archive not found" | |
194 | fi | |
195 | for member | |
196 | do | |
197 | case $1 in | |
198 | @*) | |
199 | func_at_file "${1#@}" -REMOVE "$archive" | |
200 | ;; | |
201 | *) | |
202 | func_file_conv "$1" | |
203 | $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $? | |
204 | ;; | |
205 | esac | |
206 | done | |
207 | ||
208 | elif test -n "$extract"; then | |
209 | if test ! -f "$orig_archive"; then | |
210 | func_error "archive not found" | |
211 | fi | |
212 | if test $# -gt 0; then | |
213 | for member | |
214 | do | |
215 | case $1 in | |
216 | @*) | |
217 | func_at_file "${1#@}" -EXTRACT "$archive" | |
218 | ;; | |
219 | *) | |
220 | func_file_conv "$1" | |
221 | $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $? | |
222 | ;; | |
223 | esac | |
224 | done | |
225 | else | |
226 | $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \ | |
227 | | while read member | |
228 | do | |
229 | $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? | |
230 | done | |
231 | fi | |
232 | ||
233 | elif test -n "$quick$replace"; then | |
234 | if test ! -f "$orig_archive"; then | |
235 | if test -z "$create"; then | |
236 | echo "$me: creating $orig_archive" | |
237 | fi | |
238 | orig_archive= | |
239 | else | |
240 | orig_archive=$archive | |
241 | fi | |
242 | ||
243 | for member | |
244 | do | |
245 | case $1 in | |
246 | @*) | |
247 | func_file_conv "${1#@}" | |
248 | set x "$@" "@$file" | |
249 | ;; | |
250 | *) | |
251 | func_file_conv "$1" | |
252 | set x "$@" "$file" | |
253 | ;; | |
254 | esac | |
255 | shift | |
256 | shift | |
257 | done | |
258 | ||
259 | if test -n "$orig_archive"; then | |
260 | $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $? | |
261 | else | |
262 | $AR -NOLOGO -OUT:"$archive" "$@" || exit $? | |
263 | fi | |
264 | ||
265 | elif test -n "$list"; then | |
266 | if test ! -f "$orig_archive"; then | |
267 | func_error "archive not found" | |
268 | fi | |
269 | $AR -NOLOGO -LIST "$archive" || exit $? | |
270 | fi |
0 | #! /bin/sh | |
1 | # Wrapper for compilers which do not understand '-c -o'. | |
2 | ||
3 | scriptversion=2018-03-07.03; # UTC | |
4 | ||
5 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
6 | # Written by Tom Tromey <tromey@cygnus.com>. | |
7 | # | |
8 | # This program is free software; you can redistribute it and/or modify | |
9 | # it under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2, or (at your option) | |
11 | # any later version. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | # | |
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | |
20 | ||
21 | # As a special exception to the GNU General Public License, if you | |
22 | # distribute this file as part of a program that contains a | |
23 | # configuration script generated by Autoconf, you may include it under | |
24 | # the same distribution terms that you use for the rest of that program. | |
25 | ||
26 | # This file is maintained in Automake, please report | |
27 | # bugs to <bug-automake@gnu.org> or send patches to | |
28 | # <automake-patches@gnu.org>. | |
29 | ||
30 | nl=' | |
31 | ' | |
32 | ||
33 | # We need space, tab and new line, in precisely that order. Quoting is | |
34 | # there to prevent tools from complaining about whitespace usage. | |
35 | IFS=" "" $nl" | |
36 | ||
37 | file_conv= | |
38 | ||
39 | # func_file_conv build_file lazy | |
40 | # Convert a $build file to $host form and store it in $file | |
41 | # Currently only supports Windows hosts. If the determined conversion | |
42 | # type is listed in (the comma separated) LAZY, no conversion will | |
43 | # take place. | |
44 | func_file_conv () | |
45 | { | |
46 | file=$1 | |
47 | case $file in | |
48 | / | /[!/]*) # absolute file, and not a UNC file | |
49 | if test -z "$file_conv"; then | |
50 | # lazily determine how to convert abs files | |
51 | case `uname -s` in | |
52 | MINGW*) | |
53 | file_conv=mingw | |
54 | ;; | |
55 | CYGWIN* | MSYS*) | |
56 | file_conv=cygwin | |
57 | ;; | |
58 | *) | |
59 | file_conv=wine | |
60 | ;; | |
61 | esac | |
62 | fi | |
63 | case $file_conv/,$2, in | |
64 | *,$file_conv,*) | |
65 | ;; | |
66 | mingw/*) | |
67 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` | |
68 | ;; | |
69 | cygwin/* | msys/*) | |
70 | file=`cygpath -m "$file" || echo "$file"` | |
71 | ;; | |
72 | wine/*) | |
73 | file=`winepath -w "$file" || echo "$file"` | |
74 | ;; | |
75 | esac | |
76 | ;; | |
77 | esac | |
78 | } | |
79 | ||
80 | # func_cl_dashL linkdir | |
81 | # Make cl look for libraries in LINKDIR | |
82 | func_cl_dashL () | |
83 | { | |
84 | func_file_conv "$1" | |
85 | if test -z "$lib_path"; then | |
86 | lib_path=$file | |
87 | else | |
88 | lib_path="$lib_path;$file" | |
89 | fi | |
90 | linker_opts="$linker_opts -LIBPATH:$file" | |
91 | } | |
92 | ||
93 | # func_cl_dashl library | |
94 | # Do a library search-path lookup for cl | |
95 | func_cl_dashl () | |
96 | { | |
97 | lib=$1 | |
98 | found=no | |
99 | save_IFS=$IFS | |
100 | IFS=';' | |
101 | for dir in $lib_path $LIB | |
102 | do | |
103 | IFS=$save_IFS | |
104 | if $shared && test -f "$dir/$lib.dll.lib"; then | |
105 | found=yes | |
106 | lib=$dir/$lib.dll.lib | |
107 | break | |
108 | fi | |
109 | if test -f "$dir/$lib.lib"; then | |
110 | found=yes | |
111 | lib=$dir/$lib.lib | |
112 | break | |
113 | fi | |
114 | if test -f "$dir/lib$lib.a"; then | |
115 | found=yes | |
116 | lib=$dir/lib$lib.a | |
117 | break | |
118 | fi | |
119 | done | |
120 | IFS=$save_IFS | |
121 | ||
122 | if test "$found" != yes; then | |
123 | lib=$lib.lib | |
124 | fi | |
125 | } | |
126 | ||
127 | # func_cl_wrapper cl arg... | |
128 | # Adjust compile command to suit cl | |
129 | func_cl_wrapper () | |
130 | { | |
131 | # Assume a capable shell | |
132 | lib_path= | |
133 | shared=: | |
134 | linker_opts= | |
135 | for arg | |
136 | do | |
137 | if test -n "$eat"; then | |
138 | eat= | |
139 | else | |
140 | case $1 in | |
141 | -o) | |
142 | # configure might choose to run compile as 'compile cc -o foo foo.c'. | |
143 | eat=1 | |
144 | case $2 in | |
145 | *.o | *.[oO][bB][jJ]) | |
146 | func_file_conv "$2" | |
147 | set x "$@" -Fo"$file" | |
148 | shift | |
149 | ;; | |
150 | *) | |
151 | func_file_conv "$2" | |
152 | set x "$@" -Fe"$file" | |
153 | shift | |
154 | ;; | |
155 | esac | |
156 | ;; | |
157 | -I) | |
158 | eat=1 | |
159 | func_file_conv "$2" mingw | |
160 | set x "$@" -I"$file" | |
161 | shift | |
162 | ;; | |
163 | -I*) | |
164 | func_file_conv "${1#-I}" mingw | |
165 | set x "$@" -I"$file" | |
166 | shift | |
167 | ;; | |
168 | -l) | |
169 | eat=1 | |
170 | func_cl_dashl "$2" | |
171 | set x "$@" "$lib" | |
172 | shift | |
173 | ;; | |
174 | -l*) | |
175 | func_cl_dashl "${1#-l}" | |
176 | set x "$@" "$lib" | |
177 | shift | |
178 | ;; | |
179 | -L) | |
180 | eat=1 | |
181 | func_cl_dashL "$2" | |
182 | ;; | |
183 | -L*) | |
184 | func_cl_dashL "${1#-L}" | |
185 | ;; | |
186 | -static) | |
187 | shared=false | |
188 | ;; | |
189 | -Wl,*) | |
190 | arg=${1#-Wl,} | |
191 | save_ifs="$IFS"; IFS=',' | |
192 | for flag in $arg; do | |
193 | IFS="$save_ifs" | |
194 | linker_opts="$linker_opts $flag" | |
195 | done | |
196 | IFS="$save_ifs" | |
197 | ;; | |
198 | -Xlinker) | |
199 | eat=1 | |
200 | linker_opts="$linker_opts $2" | |
201 | ;; | |
202 | -*) | |
203 | set x "$@" "$1" | |
204 | shift | |
205 | ;; | |
206 | *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) | |
207 | func_file_conv "$1" | |
208 | set x "$@" -Tp"$file" | |
209 | shift | |
210 | ;; | |
211 | *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) | |
212 | func_file_conv "$1" mingw | |
213 | set x "$@" "$file" | |
214 | shift | |
215 | ;; | |
216 | *) | |
217 | set x "$@" "$1" | |
218 | shift | |
219 | ;; | |
220 | esac | |
221 | fi | |
222 | shift | |
223 | done | |
224 | if test -n "$linker_opts"; then | |
225 | linker_opts="-link$linker_opts" | |
226 | fi | |
227 | exec "$@" $linker_opts | |
228 | exit 1 | |
229 | } | |
230 | ||
231 | eat= | |
232 | ||
233 | case $1 in | |
234 | '') | |
235 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
236 | exit 1; | |
237 | ;; | |
238 | -h | --h*) | |
239 | cat <<\EOF | |
240 | Usage: compile [--help] [--version] PROGRAM [ARGS] | |
241 | ||
242 | Wrapper for compilers which do not understand '-c -o'. | |
243 | Remove '-o dest.o' from ARGS, run PROGRAM with the remaining | |
244 | arguments, and rename the output as expected. | |
245 | ||
246 | If you are trying to build a whole package this is not the | |
247 | right script to run: please start by reading the file 'INSTALL'. | |
248 | ||
249 | Report bugs to <bug-automake@gnu.org>. | |
250 | EOF | |
251 | exit $? | |
252 | ;; | |
253 | -v | --v*) | |
254 | echo "compile $scriptversion" | |
255 | exit $? | |
256 | ;; | |
257 | cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ | |
258 | icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) | |
259 | func_cl_wrapper "$@" # Doesn't return... | |
260 | ;; | |
261 | esac | |
262 | ||
263 | ofile= | |
264 | cfile= | |
265 | ||
266 | for arg | |
267 | do | |
268 | if test -n "$eat"; then | |
269 | eat= | |
270 | else | |
271 | case $1 in | |
272 | -o) | |
273 | # configure might choose to run compile as 'compile cc -o foo foo.c'. | |
274 | # So we strip '-o arg' only if arg is an object. | |
275 | eat=1 | |
276 | case $2 in | |
277 | *.o | *.obj) | |
278 | ofile=$2 | |
279 | ;; | |
280 | *) | |
281 | set x "$@" -o "$2" | |
282 | shift | |
283 | ;; | |
284 | esac | |
285 | ;; | |
286 | *.c) | |
287 | cfile=$1 | |
288 | set x "$@" "$1" | |
289 | shift | |
290 | ;; | |
291 | *) | |
292 | set x "$@" "$1" | |
293 | shift | |
294 | ;; | |
295 | esac | |
296 | fi | |
297 | shift | |
298 | done | |
299 | ||
300 | if test -z "$ofile" || test -z "$cfile"; then | |
301 | # If no '-o' option was seen then we might have been invoked from a | |
302 | # pattern rule where we don't need one. That is ok -- this is a | |
303 | # normal compilation that the losing compiler can handle. If no | |
304 | # '.c' file was seen then we are probably linking. That is also | |
305 | # ok. | |
306 | exec "$@" | |
307 | fi | |
308 | ||
309 | # Name of file we expect compiler to create. | |
310 | cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` | |
311 | ||
312 | # Create the lock directory. | |
313 | # Note: use '[/\\:.-]' here to ensure that we don't use the same name | |
314 | # that we are using for the .o file. Also, base the name on the expected | |
315 | # object file name, since that is what matters with a parallel build. | |
316 | lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d | |
317 | while true; do | |
318 | if mkdir "$lockdir" >/dev/null 2>&1; then | |
319 | break | |
320 | fi | |
321 | sleep 1 | |
322 | done | |
323 | # FIXME: race condition here if user kills between mkdir and trap. | |
324 | trap "rmdir '$lockdir'; exit 1" 1 2 15 | |
325 | ||
326 | # Run the compile. | |
327 | "$@" | |
328 | ret=$? | |
329 | ||
330 | if test -f "$cofile"; then | |
331 | test "$cofile" = "$ofile" || mv "$cofile" "$ofile" | |
332 | elif test -f "${cofile}bj"; then | |
333 | test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" | |
334 | fi | |
335 | ||
336 | rmdir "$lockdir" | |
337 | exit $ret | |
338 | ||
339 | # Local Variables: | |
340 | # mode: shell-script | |
341 | # sh-indentation: 2 | |
342 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
343 | # time-stamp-start: "scriptversion=" | |
344 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
345 | # time-stamp-time-zone: "UTC0" | |
346 | # time-stamp-end: "; # UTC" | |
347 | # End: |
0 | #! /bin/sh | |
1 | # Attempt to guess a canonical system name. | |
2 | # Copyright 1992-2020 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2020-01-01' | |
5 | ||
6 | # This file is free software; you can redistribute it and/or modify it | |
7 | # under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 3 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, see <https://www.gnu.org/licenses/>. | |
18 | # | |
19 | # As a special exception to the GNU General Public License, if you | |
20 | # distribute this file as part of a program that contains a | |
21 | # configuration script generated by Autoconf, you may include it under | |
22 | # the same distribution terms that you use for the rest of that | |
23 | # program. This Exception is an additional permission under section 7 | |
24 | # of the GNU General Public License, version 3 ("GPLv3"). | |
25 | # | |
26 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. | |
27 | # | |
28 | # You can get the latest version of this script from: | |
29 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
30 | # | |
31 | # Please send patches to <config-patches@gnu.org>. | |
32 | ||
33 | ||
34 | me=`echo "$0" | sed -e 's,.*/,,'` | |
35 | ||
36 | usage="\ | |
37 | Usage: $0 [OPTION] | |
38 | ||
39 | Output the configuration name of the system \`$me' is run on. | |
40 | ||
41 | Options: | |
42 | -h, --help print this help, then exit | |
43 | -t, --time-stamp print date of last modification, then exit | |
44 | -v, --version print version number, then exit | |
45 | ||
46 | Report bugs and patches to <config-patches@gnu.org>." | |
47 | ||
48 | version="\ | |
49 | GNU config.guess ($timestamp) | |
50 | ||
51 | Originally written by Per Bothner. | |
52 | Copyright 1992-2020 Free Software Foundation, Inc. | |
53 | ||
54 | This is free software; see the source for copying conditions. There is NO | |
55 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
56 | ||
57 | help=" | |
58 | Try \`$me --help' for more information." | |
59 | ||
60 | # Parse command line | |
61 | while test $# -gt 0 ; do | |
62 | case $1 in | |
63 | --time-stamp | --time* | -t ) | |
64 | echo "$timestamp" ; exit ;; | |
65 | --version | -v ) | |
66 | echo "$version" ; exit ;; | |
67 | --help | --h* | -h ) | |
68 | echo "$usage"; exit ;; | |
69 | -- ) # Stop option processing | |
70 | shift; break ;; | |
71 | - ) # Use stdin as input. | |
72 | break ;; | |
73 | -* ) | |
74 | echo "$me: invalid option $1$help" >&2 | |
75 | exit 1 ;; | |
76 | * ) | |
77 | break ;; | |
78 | esac | |
79 | done | |
80 | ||
81 | if test $# != 0; then | |
82 | echo "$me: too many arguments$help" >&2 | |
83 | exit 1 | |
84 | fi | |
85 | ||
86 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a | |
87 | # compiler to aid in system detection is discouraged as it requires | |
88 | # temporary files to be created and, as you can see below, it is a | |
89 | # headache to deal with in a portable fashion. | |
90 | ||
91 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | |
92 | # use `HOST_CC' if defined, but it is deprecated. | |
93 | ||
94 | # Portable tmp directory creation inspired by the Autoconf team. | |
95 | ||
96 | tmp= | |
97 | # shellcheck disable=SC2172 | |
98 | trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 | |
99 | ||
100 | set_cc_for_build() { | |
101 | # prevent multiple calls if $tmp is already set | |
102 | test "$tmp" && return 0 | |
103 | : "${TMPDIR=/tmp}" | |
104 | # shellcheck disable=SC2039 | |
105 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
106 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || | |
107 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
108 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } | |
109 | dummy=$tmp/dummy | |
110 | case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in | |
111 | ,,) echo "int x;" > "$dummy.c" | |
112 | for driver in cc gcc c89 c99 ; do | |
113 | if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
114 | CC_FOR_BUILD="$driver" | |
115 | break | |
116 | fi | |
117 | done | |
118 | if test x"$CC_FOR_BUILD" = x ; then | |
119 | CC_FOR_BUILD=no_compiler_found | |
120 | fi | |
121 | ;; | |
122 | ,,*) CC_FOR_BUILD=$CC ;; | |
123 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
124 | esac | |
125 | } | |
126 | ||
127 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | |
128 | # (ghazi@noc.rutgers.edu 1994-08-24) | |
129 | if test -f /.attbin/uname ; then | |
130 | PATH=$PATH:/.attbin ; export PATH | |
131 | fi | |
132 | ||
133 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | |
134 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | |
135 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
136 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | |
137 | ||
138 | case "$UNAME_SYSTEM" in | |
139 | Linux|GNU|GNU/*) | |
140 | # If the system lacks a compiler, then just pick glibc. | |
141 | # We could probably try harder. | |
142 | LIBC=gnu | |
143 | ||
144 | set_cc_for_build | |
145 | cat <<-EOF > "$dummy.c" | |
146 | #include <features.h> | |
147 | #if defined(__UCLIBC__) | |
148 | LIBC=uclibc | |
149 | #elif defined(__dietlibc__) | |
150 | LIBC=dietlibc | |
151 | #else | |
152 | LIBC=gnu | |
153 | #endif | |
154 | EOF | |
155 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | |
156 | ||
157 | # If ldd exists, use it to detect musl libc. | |
158 | if command -v ldd >/dev/null && \ | |
159 | ldd --version 2>&1 | grep -q ^musl | |
160 | then | |
161 | LIBC=musl | |
162 | fi | |
163 | ;; | |
164 | esac | |
165 | ||
166 | # Note: order is significant - the case branches are not exclusive. | |
167 | ||
168 | case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
169 | *:NetBSD:*:*) | |
170 | # NetBSD (nbsd) targets should (where applicable) match one or | |
171 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | |
172 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | |
173 | # switched to ELF, *-*-netbsd* would select the old | |
174 | # object file format. This provides both forward | |
175 | # compatibility and a consistent mechanism for selecting the | |
176 | # object file format. | |
177 | # | |
178 | # Note: NetBSD doesn't particularly care about the vendor | |
179 | # portion of the name. We always set it to "unknown". | |
180 | sysctl="sysctl -n hw.machine_arch" | |
181 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ | |
182 | "/sbin/$sysctl" 2>/dev/null || \ | |
183 | "/usr/sbin/$sysctl" 2>/dev/null || \ | |
184 | echo unknown)` | |
185 | case "$UNAME_MACHINE_ARCH" in | |
186 | armeb) machine=armeb-unknown ;; | |
187 | arm*) machine=arm-unknown ;; | |
188 | sh3el) machine=shl-unknown ;; | |
189 | sh3eb) machine=sh-unknown ;; | |
190 | sh5el) machine=sh5le-unknown ;; | |
191 | earmv*) | |
192 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` | |
193 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` | |
194 | machine="${arch}${endian}"-unknown | |
195 | ;; | |
196 | *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
197 | esac | |
198 | # The Operating System including object format, if it has switched | |
199 | # to ELF recently (or will in the future) and ABI. | |
200 | case "$UNAME_MACHINE_ARCH" in | |
201 | earm*) | |
202 | os=netbsdelf | |
203 | ;; | |
204 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) | |
205 | set_cc_for_build | |
206 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
207 | | grep -q __ELF__ | |
208 | then | |
209 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | |
210 | # Return netbsd for either. FIX? | |
211 | os=netbsd | |
212 | else | |
213 | os=netbsdelf | |
214 | fi | |
215 | ;; | |
216 | *) | |
217 | os=netbsd | |
218 | ;; | |
219 | esac | |
220 | # Determine ABI tags. | |
221 | case "$UNAME_MACHINE_ARCH" in | |
222 | earm*) | |
223 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' | |
224 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` | |
225 | ;; | |
226 | esac | |
227 | # The OS release | |
228 | # Debian GNU/NetBSD machines have a different userland, and | |
229 | # thus, need a distinct triplet. However, they do not need | |
230 | # kernel version information, so it can be replaced with a | |
231 | # suitable tag, in the style of linux-gnu. | |
232 | case "$UNAME_VERSION" in | |
233 | Debian*) | |
234 | release='-gnu' | |
235 | ;; | |
236 | *) | |
237 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` | |
238 | ;; | |
239 | esac | |
240 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | |
241 | # contains redundant information, the shorter form: | |
242 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | |
243 | echo "$machine-${os}${release}${abi-}" | |
244 | exit ;; | |
245 | *:Bitrig:*:*) | |
246 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | |
247 | echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
248 | exit ;; | |
249 | *:OpenBSD:*:*) | |
250 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | |
251 | echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
252 | exit ;; | |
253 | *:LibertyBSD:*:*) | |
254 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` | |
255 | echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
256 | exit ;; | |
257 | *:MidnightBSD:*:*) | |
258 | echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
259 | exit ;; | |
260 | *:ekkoBSD:*:*) | |
261 | echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
262 | exit ;; | |
263 | *:SolidBSD:*:*) | |
264 | echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
265 | exit ;; | |
266 | *:OS108:*:*) | |
267 | echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" | |
268 | exit ;; | |
269 | macppc:MirBSD:*:*) | |
270 | echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
271 | exit ;; | |
272 | *:MirBSD:*:*) | |
273 | echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
274 | exit ;; | |
275 | *:Sortix:*:*) | |
276 | echo "$UNAME_MACHINE"-unknown-sortix | |
277 | exit ;; | |
278 | *:Twizzler:*:*) | |
279 | echo "$UNAME_MACHINE"-unknown-twizzler | |
280 | exit ;; | |
281 | *:Redox:*:*) | |
282 | echo "$UNAME_MACHINE"-unknown-redox | |
283 | exit ;; | |
284 | mips:OSF1:*.*) | |
285 | echo mips-dec-osf1 | |
286 | exit ;; | |
287 | alpha:OSF1:*:*) | |
288 | case $UNAME_RELEASE in | |
289 | *4.0) | |
290 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | |
291 | ;; | |
292 | *5.*) | |
293 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
294 | ;; | |
295 | esac | |
296 | # According to Compaq, /usr/sbin/psrinfo has been available on | |
297 | # OSF/1 and Tru64 systems produced since 1995. I hope that | |
298 | # covers most systems running today. This code pipes the CPU | |
299 | # types through head -n 1, so we only detect the type of CPU 0. | |
300 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | |
301 | case "$ALPHA_CPU_TYPE" in | |
302 | "EV4 (21064)") | |
303 | UNAME_MACHINE=alpha ;; | |
304 | "EV4.5 (21064)") | |
305 | UNAME_MACHINE=alpha ;; | |
306 | "LCA4 (21066/21068)") | |
307 | UNAME_MACHINE=alpha ;; | |
308 | "EV5 (21164)") | |
309 | UNAME_MACHINE=alphaev5 ;; | |
310 | "EV5.6 (21164A)") | |
311 | UNAME_MACHINE=alphaev56 ;; | |
312 | "EV5.6 (21164PC)") | |
313 | UNAME_MACHINE=alphapca56 ;; | |
314 | "EV5.7 (21164PC)") | |
315 | UNAME_MACHINE=alphapca57 ;; | |
316 | "EV6 (21264)") | |
317 | UNAME_MACHINE=alphaev6 ;; | |
318 | "EV6.7 (21264A)") | |
319 | UNAME_MACHINE=alphaev67 ;; | |
320 | "EV6.8CB (21264C)") | |
321 | UNAME_MACHINE=alphaev68 ;; | |
322 | "EV6.8AL (21264B)") | |
323 | UNAME_MACHINE=alphaev68 ;; | |
324 | "EV6.8CX (21264D)") | |
325 | UNAME_MACHINE=alphaev68 ;; | |
326 | "EV6.9A (21264/EV69A)") | |
327 | UNAME_MACHINE=alphaev69 ;; | |
328 | "EV7 (21364)") | |
329 | UNAME_MACHINE=alphaev7 ;; | |
330 | "EV7.9 (21364A)") | |
331 | UNAME_MACHINE=alphaev79 ;; | |
332 | esac | |
333 | # A Pn.n version is a patched version. | |
334 | # A Vn.n version is a released version. | |
335 | # A Tn.n version is a released field test version. | |
336 | # A Xn.n version is an unreleased experimental baselevel. | |
337 | # 1.2 uses "1.2" for uname -r. | |
338 | echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | |
339 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
340 | exitcode=$? | |
341 | trap '' 0 | |
342 | exit $exitcode ;; | |
343 | Amiga*:UNIX_System_V:4.0:*) | |
344 | echo m68k-unknown-sysv4 | |
345 | exit ;; | |
346 | *:[Aa]miga[Oo][Ss]:*:*) | |
347 | echo "$UNAME_MACHINE"-unknown-amigaos | |
348 | exit ;; | |
349 | *:[Mm]orph[Oo][Ss]:*:*) | |
350 | echo "$UNAME_MACHINE"-unknown-morphos | |
351 | exit ;; | |
352 | *:OS/390:*:*) | |
353 | echo i370-ibm-openedition | |
354 | exit ;; | |
355 | *:z/VM:*:*) | |
356 | echo s390-ibm-zvmoe | |
357 | exit ;; | |
358 | *:OS400:*:*) | |
359 | echo powerpc-ibm-os400 | |
360 | exit ;; | |
361 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | |
362 | echo arm-acorn-riscix"$UNAME_RELEASE" | |
363 | exit ;; | |
364 | arm*:riscos:*:*|arm*:RISCOS:*:*) | |
365 | echo arm-unknown-riscos | |
366 | exit ;; | |
367 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | |
368 | echo hppa1.1-hitachi-hiuxmpp | |
369 | exit ;; | |
370 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | |
371 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | |
372 | if test "`(/bin/universe) 2>/dev/null`" = att ; then | |
373 | echo pyramid-pyramid-sysv3 | |
374 | else | |
375 | echo pyramid-pyramid-bsd | |
376 | fi | |
377 | exit ;; | |
378 | NILE*:*:*:dcosx) | |
379 | echo pyramid-pyramid-svr4 | |
380 | exit ;; | |
381 | DRS?6000:unix:4.0:6*) | |
382 | echo sparc-icl-nx6 | |
383 | exit ;; | |
384 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | |
385 | case `/usr/bin/uname -p` in | |
386 | sparc) echo sparc-icl-nx7; exit ;; | |
387 | esac ;; | |
388 | s390x:SunOS:*:*) | |
389 | echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
390 | exit ;; | |
391 | sun4H:SunOS:5.*:*) | |
392 | echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
393 | exit ;; | |
394 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | |
395 | echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
396 | exit ;; | |
397 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | |
398 | echo i386-pc-auroraux"$UNAME_RELEASE" | |
399 | exit ;; | |
400 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | |
401 | set_cc_for_build | |
402 | SUN_ARCH=i386 | |
403 | # If there is a compiler, see if it is configured for 64-bit objects. | |
404 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | |
405 | # This test works for both compilers. | |
406 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
407 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
408 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
409 | grep IS_64BIT_ARCH >/dev/null | |
410 | then | |
411 | SUN_ARCH=x86_64 | |
412 | fi | |
413 | fi | |
414 | echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
415 | exit ;; | |
416 | sun4*:SunOS:6*:*) | |
417 | # According to config.sub, this is the proper way to canonicalize | |
418 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but | |
419 | # it's likely to be more like Solaris than SunOS4. | |
420 | echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
421 | exit ;; | |
422 | sun4*:SunOS:*:*) | |
423 | case "`/usr/bin/arch -k`" in | |
424 | Series*|S4*) | |
425 | UNAME_RELEASE=`uname -v` | |
426 | ;; | |
427 | esac | |
428 | # Japanese Language versions have a version number like `4.1.3-JL'. | |
429 | echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" | |
430 | exit ;; | |
431 | sun3*:SunOS:*:*) | |
432 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
433 | exit ;; | |
434 | sun*:*:4.2BSD:*) | |
435 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | |
436 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 | |
437 | case "`/bin/arch`" in | |
438 | sun3) | |
439 | echo m68k-sun-sunos"$UNAME_RELEASE" | |
440 | ;; | |
441 | sun4) | |
442 | echo sparc-sun-sunos"$UNAME_RELEASE" | |
443 | ;; | |
444 | esac | |
445 | exit ;; | |
446 | aushp:SunOS:*:*) | |
447 | echo sparc-auspex-sunos"$UNAME_RELEASE" | |
448 | exit ;; | |
449 | # The situation for MiNT is a little confusing. The machine name | |
450 | # can be virtually everything (everything which is not | |
451 | # "atarist" or "atariste" at least should have a processor | |
452 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | |
453 | # to the lowercase version "mint" (or "freemint"). Finally | |
454 | # the system name "TOS" denotes a system which is actually not | |
455 | # MiNT. But MiNT is downward compatible to TOS, so this should | |
456 | # be no problem. | |
457 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | |
458 | echo m68k-atari-mint"$UNAME_RELEASE" | |
459 | exit ;; | |
460 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | |
461 | echo m68k-atari-mint"$UNAME_RELEASE" | |
462 | exit ;; | |
463 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | |
464 | echo m68k-atari-mint"$UNAME_RELEASE" | |
465 | exit ;; | |
466 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | |
467 | echo m68k-milan-mint"$UNAME_RELEASE" | |
468 | exit ;; | |
469 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | |
470 | echo m68k-hades-mint"$UNAME_RELEASE" | |
471 | exit ;; | |
472 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | |
473 | echo m68k-unknown-mint"$UNAME_RELEASE" | |
474 | exit ;; | |
475 | m68k:machten:*:*) | |
476 | echo m68k-apple-machten"$UNAME_RELEASE" | |
477 | exit ;; | |
478 | powerpc:machten:*:*) | |
479 | echo powerpc-apple-machten"$UNAME_RELEASE" | |
480 | exit ;; | |
481 | RISC*:Mach:*:*) | |
482 | echo mips-dec-mach_bsd4.3 | |
483 | exit ;; | |
484 | RISC*:ULTRIX:*:*) | |
485 | echo mips-dec-ultrix"$UNAME_RELEASE" | |
486 | exit ;; | |
487 | VAX*:ULTRIX*:*:*) | |
488 | echo vax-dec-ultrix"$UNAME_RELEASE" | |
489 | exit ;; | |
490 | 2020:CLIX:*:* | 2430:CLIX:*:*) | |
491 | echo clipper-intergraph-clix"$UNAME_RELEASE" | |
492 | exit ;; | |
493 | mips:*:*:UMIPS | mips:*:*:RISCos) | |
494 | set_cc_for_build | |
495 | sed 's/^ //' << EOF > "$dummy.c" | |
496 | #ifdef __cplusplus | |
497 | #include <stdio.h> /* for printf() prototype */ | |
498 | int main (int argc, char *argv[]) { | |
499 | #else | |
500 | int main (argc, argv) int argc; char *argv[]; { | |
501 | #endif | |
502 | #if defined (host_mips) && defined (MIPSEB) | |
503 | #if defined (SYSTYPE_SYSV) | |
504 | printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); | |
505 | #endif | |
506 | #if defined (SYSTYPE_SVR4) | |
507 | printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); | |
508 | #endif | |
509 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) | |
510 | printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); | |
511 | #endif | |
512 | #endif | |
513 | exit (-1); | |
514 | } | |
515 | EOF | |
516 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && | |
517 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
518 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && | |
519 | { echo "$SYSTEM_NAME"; exit; } | |
520 | echo mips-mips-riscos"$UNAME_RELEASE" | |
521 | exit ;; | |
522 | Motorola:PowerMAX_OS:*:*) | |
523 | echo powerpc-motorola-powermax | |
524 | exit ;; | |
525 | Motorola:*:4.3:PL8-*) | |
526 | echo powerpc-harris-powermax | |
527 | exit ;; | |
528 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | |
529 | echo powerpc-harris-powermax | |
530 | exit ;; | |
531 | Night_Hawk:Power_UNIX:*:*) | |
532 | echo powerpc-harris-powerunix | |
533 | exit ;; | |
534 | m88k:CX/UX:7*:*) | |
535 | echo m88k-harris-cxux7 | |
536 | exit ;; | |
537 | m88k:*:4*:R4*) | |
538 | echo m88k-motorola-sysv4 | |
539 | exit ;; | |
540 | m88k:*:3*:R3*) | |
541 | echo m88k-motorola-sysv3 | |
542 | exit ;; | |
543 | AViiON:dgux:*:*) | |
544 | # DG/UX returns AViiON for all architectures | |
545 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
546 | if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
547 | then | |
548 | if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
549 | [ "$TARGET_BINARY_INTERFACE"x = x ] | |
550 | then | |
551 | echo m88k-dg-dgux"$UNAME_RELEASE" | |
552 | else | |
553 | echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
554 | fi | |
555 | else | |
556 | echo i586-dg-dgux"$UNAME_RELEASE" | |
557 | fi | |
558 | exit ;; | |
559 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) | |
560 | echo m88k-dolphin-sysv3 | |
561 | exit ;; | |
562 | M88*:*:R3*:*) | |
563 | # Delta 88k system running SVR3 | |
564 | echo m88k-motorola-sysv3 | |
565 | exit ;; | |
566 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | |
567 | echo m88k-tektronix-sysv3 | |
568 | exit ;; | |
569 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | |
570 | echo m68k-tektronix-bsd | |
571 | exit ;; | |
572 | *:IRIX*:*:*) | |
573 | echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
574 | exit ;; | |
575 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | |
576 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
577 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
578 | i*86:AIX:*:*) | |
579 | echo i386-ibm-aix | |
580 | exit ;; | |
581 | ia64:AIX:*:*) | |
582 | if [ -x /usr/bin/oslevel ] ; then | |
583 | IBM_REV=`/usr/bin/oslevel` | |
584 | else | |
585 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
586 | fi | |
587 | echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
588 | exit ;; | |
589 | *:AIX:2:3) | |
590 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | |
591 | set_cc_for_build | |
592 | sed 's/^ //' << EOF > "$dummy.c" | |
593 | #include <sys/systemcfg.h> | |
594 | ||
595 | main() | |
596 | { | |
597 | if (!__power_pc()) | |
598 | exit(1); | |
599 | puts("powerpc-ibm-aix3.2.5"); | |
600 | exit(0); | |
601 | } | |
602 | EOF | |
603 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` | |
604 | then | |
605 | echo "$SYSTEM_NAME" | |
606 | else | |
607 | echo rs6000-ibm-aix3.2.5 | |
608 | fi | |
609 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | |
610 | echo rs6000-ibm-aix3.2.4 | |
611 | else | |
612 | echo rs6000-ibm-aix3.2 | |
613 | fi | |
614 | exit ;; | |
615 | *:AIX:*:[4567]) | |
616 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | |
617 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then | |
618 | IBM_ARCH=rs6000 | |
619 | else | |
620 | IBM_ARCH=powerpc | |
621 | fi | |
622 | if [ -x /usr/bin/lslpp ] ; then | |
623 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | |
624 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` | |
625 | else | |
626 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
627 | fi | |
628 | echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
629 | exit ;; | |
630 | *:AIX:*:*) | |
631 | echo rs6000-ibm-aix | |
632 | exit ;; | |
633 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) | |
634 | echo romp-ibm-bsd4.4 | |
635 | exit ;; | |
636 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | |
637 | echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to | |
638 | exit ;; # report: romp-ibm BSD 4.3 | |
639 | *:BOSX:*:*) | |
640 | echo rs6000-bull-bosx | |
641 | exit ;; | |
642 | DPX/2?00:B.O.S.:*:*) | |
643 | echo m68k-bull-sysv3 | |
644 | exit ;; | |
645 | 9000/[34]??:4.3bsd:1.*:*) | |
646 | echo m68k-hp-bsd | |
647 | exit ;; | |
648 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | |
649 | echo m68k-hp-bsd4.4 | |
650 | exit ;; | |
651 | 9000/[34678]??:HP-UX:*:*) | |
652 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
653 | case "$UNAME_MACHINE" in | |
654 | 9000/31?) HP_ARCH=m68000 ;; | |
655 | 9000/[34]??) HP_ARCH=m68k ;; | |
656 | 9000/[678][0-9][0-9]) | |
657 | if [ -x /usr/bin/getconf ]; then | |
658 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | |
659 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
660 | case "$sc_cpu_version" in | |
661 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 | |
662 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 | |
663 | 532) # CPU_PA_RISC2_0 | |
664 | case "$sc_kernel_bits" in | |
665 | 32) HP_ARCH=hppa2.0n ;; | |
666 | 64) HP_ARCH=hppa2.0w ;; | |
667 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 | |
668 | esac ;; | |
669 | esac | |
670 | fi | |
671 | if [ "$HP_ARCH" = "" ]; then | |
672 | set_cc_for_build | |
673 | sed 's/^ //' << EOF > "$dummy.c" | |
674 | ||
675 | #define _HPUX_SOURCE | |
676 | #include <stdlib.h> | |
677 | #include <unistd.h> | |
678 | ||
679 | int main () | |
680 | { | |
681 | #if defined(_SC_KERNEL_BITS) | |
682 | long bits = sysconf(_SC_KERNEL_BITS); | |
683 | #endif | |
684 | long cpu = sysconf (_SC_CPU_VERSION); | |
685 | ||
686 | switch (cpu) | |
687 | { | |
688 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
689 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
690 | case CPU_PA_RISC2_0: | |
691 | #if defined(_SC_KERNEL_BITS) | |
692 | switch (bits) | |
693 | { | |
694 | case 64: puts ("hppa2.0w"); break; | |
695 | case 32: puts ("hppa2.0n"); break; | |
696 | default: puts ("hppa2.0"); break; | |
697 | } break; | |
698 | #else /* !defined(_SC_KERNEL_BITS) */ | |
699 | puts ("hppa2.0"); break; | |
700 | #endif | |
701 | default: puts ("hppa1.0"); break; | |
702 | } | |
703 | exit (0); | |
704 | } | |
705 | EOF | |
706 | (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` | |
707 | test -z "$HP_ARCH" && HP_ARCH=hppa | |
708 | fi ;; | |
709 | esac | |
710 | if [ "$HP_ARCH" = hppa2.0w ] | |
711 | then | |
712 | set_cc_for_build | |
713 | ||
714 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | |
715 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | |
716 | # generating 64-bit code. GNU and HP use different nomenclature: | |
717 | # | |
718 | # $ CC_FOR_BUILD=cc ./config.guess | |
719 | # => hppa2.0w-hp-hpux11.23 | |
720 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | |
721 | # => hppa64-hp-hpux11.23 | |
722 | ||
723 | if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | | |
724 | grep -q __LP64__ | |
725 | then | |
726 | HP_ARCH=hppa2.0w | |
727 | else | |
728 | HP_ARCH=hppa64 | |
729 | fi | |
730 | fi | |
731 | echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
732 | exit ;; | |
733 | ia64:HP-UX:*:*) | |
734 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
735 | echo ia64-hp-hpux"$HPUX_REV" | |
736 | exit ;; | |
737 | 3050*:HI-UX:*:*) | |
738 | set_cc_for_build | |
739 | sed 's/^ //' << EOF > "$dummy.c" | |
740 | #include <unistd.h> | |
741 | int | |
742 | main () | |
743 | { | |
744 | long cpu = sysconf (_SC_CPU_VERSION); | |
745 | /* The order matters, because CPU_IS_HP_MC68K erroneously returns | |
746 | true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct | |
747 | results, however. */ | |
748 | if (CPU_IS_PA_RISC (cpu)) | |
749 | { | |
750 | switch (cpu) | |
751 | { | |
752 | case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; | |
753 | case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; | |
754 | case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; | |
755 | default: puts ("hppa-hitachi-hiuxwe2"); break; | |
756 | } | |
757 | } | |
758 | else if (CPU_IS_HP_MC68K (cpu)) | |
759 | puts ("m68k-hitachi-hiuxwe2"); | |
760 | else puts ("unknown-hitachi-hiuxwe2"); | |
761 | exit (0); | |
762 | } | |
763 | EOF | |
764 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && | |
765 | { echo "$SYSTEM_NAME"; exit; } | |
766 | echo unknown-hitachi-hiuxwe2 | |
767 | exit ;; | |
768 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) | |
769 | echo hppa1.1-hp-bsd | |
770 | exit ;; | |
771 | 9000/8??:4.3bsd:*:*) | |
772 | echo hppa1.0-hp-bsd | |
773 | exit ;; | |
774 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | |
775 | echo hppa1.0-hp-mpeix | |
776 | exit ;; | |
777 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) | |
778 | echo hppa1.1-hp-osf | |
779 | exit ;; | |
780 | hp8??:OSF1:*:*) | |
781 | echo hppa1.0-hp-osf | |
782 | exit ;; | |
783 | i*86:OSF1:*:*) | |
784 | if [ -x /usr/sbin/sysversion ] ; then | |
785 | echo "$UNAME_MACHINE"-unknown-osf1mk | |
786 | else | |
787 | echo "$UNAME_MACHINE"-unknown-osf1 | |
788 | fi | |
789 | exit ;; | |
790 | parisc*:Lites*:*:*) | |
791 | echo hppa1.1-hp-lites | |
792 | exit ;; | |
793 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | |
794 | echo c1-convex-bsd | |
795 | exit ;; | |
796 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | |
797 | if getsysinfo -f scalar_acc | |
798 | then echo c32-convex-bsd | |
799 | else echo c2-convex-bsd | |
800 | fi | |
801 | exit ;; | |
802 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | |
803 | echo c34-convex-bsd | |
804 | exit ;; | |
805 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | |
806 | echo c38-convex-bsd | |
807 | exit ;; | |
808 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | |
809 | echo c4-convex-bsd | |
810 | exit ;; | |
811 | CRAY*Y-MP:*:*:*) | |
812 | echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
813 | exit ;; | |
814 | CRAY*[A-Z]90:*:*:*) | |
815 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | |
816 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | |
817 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | |
818 | -e 's/\.[^.]*$/.X/' | |
819 | exit ;; | |
820 | CRAY*TS:*:*:*) | |
821 | echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
822 | exit ;; | |
823 | CRAY*T3E:*:*:*) | |
824 | echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
825 | exit ;; | |
826 | CRAY*SV1:*:*:*) | |
827 | echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
828 | exit ;; | |
829 | *:UNICOS/mp:*:*) | |
830 | echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
831 | exit ;; | |
832 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | |
833 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
834 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | |
835 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` | |
836 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
837 | exit ;; | |
838 | 5000:UNIX_System_V:4.*:*) | |
839 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` | |
840 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` | |
841 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
842 | exit ;; | |
843 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | |
844 | echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
845 | exit ;; | |
846 | sparc*:BSD/OS:*:*) | |
847 | echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
848 | exit ;; | |
849 | *:BSD/OS:*:*) | |
850 | echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
851 | exit ;; | |
852 | arm:FreeBSD:*:*) | |
853 | UNAME_PROCESSOR=`uname -p` | |
854 | set_cc_for_build | |
855 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
856 | | grep -q __ARM_PCS_VFP | |
857 | then | |
858 | echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi | |
859 | else | |
860 | echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf | |
861 | fi | |
862 | exit ;; | |
863 | *:FreeBSD:*:*) | |
864 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
865 | case "$UNAME_PROCESSOR" in | |
866 | amd64) | |
867 | UNAME_PROCESSOR=x86_64 ;; | |
868 | i386) | |
869 | UNAME_PROCESSOR=i586 ;; | |
870 | esac | |
871 | echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
872 | exit ;; | |
873 | i*:CYGWIN*:*) | |
874 | echo "$UNAME_MACHINE"-pc-cygwin | |
875 | exit ;; | |
876 | *:MINGW64*:*) | |
877 | echo "$UNAME_MACHINE"-pc-mingw64 | |
878 | exit ;; | |
879 | *:MINGW*:*) | |
880 | echo "$UNAME_MACHINE"-pc-mingw32 | |
881 | exit ;; | |
882 | *:MSYS*:*) | |
883 | echo "$UNAME_MACHINE"-pc-msys | |
884 | exit ;; | |
885 | i*:PW*:*) | |
886 | echo "$UNAME_MACHINE"-pc-pw32 | |
887 | exit ;; | |
888 | *:Interix*:*) | |
889 | case "$UNAME_MACHINE" in | |
890 | x86) | |
891 | echo i586-pc-interix"$UNAME_RELEASE" | |
892 | exit ;; | |
893 | authenticamd | genuineintel | EM64T) | |
894 | echo x86_64-unknown-interix"$UNAME_RELEASE" | |
895 | exit ;; | |
896 | IA64) | |
897 | echo ia64-unknown-interix"$UNAME_RELEASE" | |
898 | exit ;; | |
899 | esac ;; | |
900 | i*:UWIN*:*) | |
901 | echo "$UNAME_MACHINE"-pc-uwin | |
902 | exit ;; | |
903 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | |
904 | echo x86_64-pc-cygwin | |
905 | exit ;; | |
906 | prep*:SunOS:5.*:*) | |
907 | echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
908 | exit ;; | |
909 | *:GNU:*:*) | |
910 | # the GNU system | |
911 | echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
912 | exit ;; | |
913 | *:GNU/*:*:*) | |
914 | # other systems with GNU libc and userland | |
915 | echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" | |
916 | exit ;; | |
917 | *:Minix:*:*) | |
918 | echo "$UNAME_MACHINE"-unknown-minix | |
919 | exit ;; | |
920 | aarch64:Linux:*:*) | |
921 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
922 | exit ;; | |
923 | aarch64_be:Linux:*:*) | |
924 | UNAME_MACHINE=aarch64_be | |
925 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
926 | exit ;; | |
927 | alpha:Linux:*:*) | |
928 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in | |
929 | EV5) UNAME_MACHINE=alphaev5 ;; | |
930 | EV56) UNAME_MACHINE=alphaev56 ;; | |
931 | PCA56) UNAME_MACHINE=alphapca56 ;; | |
932 | PCA57) UNAME_MACHINE=alphapca56 ;; | |
933 | EV6) UNAME_MACHINE=alphaev6 ;; | |
934 | EV67) UNAME_MACHINE=alphaev67 ;; | |
935 | EV68*) UNAME_MACHINE=alphaev68 ;; | |
936 | esac | |
937 | objdump --private-headers /bin/sh | grep -q ld.so.1 | |
938 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi | |
939 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
940 | exit ;; | |
941 | arc:Linux:*:* | arceb:Linux:*:*) | |
942 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
943 | exit ;; | |
944 | arm*:Linux:*:*) | |
945 | set_cc_for_build | |
946 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
947 | | grep -q __ARM_EABI__ | |
948 | then | |
949 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
950 | else | |
951 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
952 | | grep -q __ARM_PCS_VFP | |
953 | then | |
954 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
955 | else | |
956 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
957 | fi | |
958 | fi | |
959 | exit ;; | |
960 | avr32*:Linux:*:*) | |
961 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
962 | exit ;; | |
963 | cris:Linux:*:*) | |
964 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
965 | exit ;; | |
966 | crisv32:Linux:*:*) | |
967 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
968 | exit ;; | |
969 | e2k:Linux:*:*) | |
970 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
971 | exit ;; | |
972 | frv:Linux:*:*) | |
973 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
974 | exit ;; | |
975 | hexagon:Linux:*:*) | |
976 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
977 | exit ;; | |
978 | i*86:Linux:*:*) | |
979 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
980 | exit ;; | |
981 | ia64:Linux:*:*) | |
982 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
983 | exit ;; | |
984 | k1om:Linux:*:*) | |
985 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
986 | exit ;; | |
987 | m32r*:Linux:*:*) | |
988 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
989 | exit ;; | |
990 | m68*:Linux:*:*) | |
991 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
992 | exit ;; | |
993 | mips:Linux:*:* | mips64:Linux:*:*) | |
994 | set_cc_for_build | |
995 | IS_GLIBC=0 | |
996 | test x"${LIBC}" = xgnu && IS_GLIBC=1 | |
997 | sed 's/^ //' << EOF > "$dummy.c" | |
998 | #undef CPU | |
999 | #undef mips | |
1000 | #undef mipsel | |
1001 | #undef mips64 | |
1002 | #undef mips64el | |
1003 | #if ${IS_GLIBC} && defined(_ABI64) | |
1004 | LIBCABI=gnuabi64 | |
1005 | #else | |
1006 | #if ${IS_GLIBC} && defined(_ABIN32) | |
1007 | LIBCABI=gnuabin32 | |
1008 | #else | |
1009 | LIBCABI=${LIBC} | |
1010 | #endif | |
1011 | #endif | |
1012 | ||
1013 | #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1014 | CPU=mipsisa64r6 | |
1015 | #else | |
1016 | #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
1017 | CPU=mipsisa32r6 | |
1018 | #else | |
1019 | #if defined(__mips64) | |
1020 | CPU=mips64 | |
1021 | #else | |
1022 | CPU=mips | |
1023 | #endif | |
1024 | #endif | |
1025 | #endif | |
1026 | ||
1027 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
1028 | MIPS_ENDIAN=el | |
1029 | #else | |
1030 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
1031 | MIPS_ENDIAN= | |
1032 | #else | |
1033 | MIPS_ENDIAN= | |
1034 | #endif | |
1035 | #endif | |
1036 | EOF | |
1037 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" | |
1038 | test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | |
1039 | ;; | |
1040 | mips64el:Linux:*:*) | |
1041 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1042 | exit ;; | |
1043 | openrisc*:Linux:*:*) | |
1044 | echo or1k-unknown-linux-"$LIBC" | |
1045 | exit ;; | |
1046 | or32:Linux:*:* | or1k*:Linux:*:*) | |
1047 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1048 | exit ;; | |
1049 | padre:Linux:*:*) | |
1050 | echo sparc-unknown-linux-"$LIBC" | |
1051 | exit ;; | |
1052 | parisc64:Linux:*:* | hppa64:Linux:*:*) | |
1053 | echo hppa64-unknown-linux-"$LIBC" | |
1054 | exit ;; | |
1055 | parisc:Linux:*:* | hppa:Linux:*:*) | |
1056 | # Look for CPU level | |
1057 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | |
1058 | PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; | |
1059 | PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; | |
1060 | *) echo hppa-unknown-linux-"$LIBC" ;; | |
1061 | esac | |
1062 | exit ;; | |
1063 | ppc64:Linux:*:*) | |
1064 | echo powerpc64-unknown-linux-"$LIBC" | |
1065 | exit ;; | |
1066 | ppc:Linux:*:*) | |
1067 | echo powerpc-unknown-linux-"$LIBC" | |
1068 | exit ;; | |
1069 | ppc64le:Linux:*:*) | |
1070 | echo powerpc64le-unknown-linux-"$LIBC" | |
1071 | exit ;; | |
1072 | ppcle:Linux:*:*) | |
1073 | echo powerpcle-unknown-linux-"$LIBC" | |
1074 | exit ;; | |
1075 | riscv32:Linux:*:* | riscv64:Linux:*:*) | |
1076 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1077 | exit ;; | |
1078 | s390:Linux:*:* | s390x:Linux:*:*) | |
1079 | echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
1080 | exit ;; | |
1081 | sh64*:Linux:*:*) | |
1082 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1083 | exit ;; | |
1084 | sh*:Linux:*:*) | |
1085 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1086 | exit ;; | |
1087 | sparc:Linux:*:* | sparc64:Linux:*:*) | |
1088 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1089 | exit ;; | |
1090 | tile*:Linux:*:*) | |
1091 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1092 | exit ;; | |
1093 | vax:Linux:*:*) | |
1094 | echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
1095 | exit ;; | |
1096 | x86_64:Linux:*:*) | |
1097 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
1098 | exit ;; | |
1099 | xtensa*:Linux:*:*) | |
1100 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
1101 | exit ;; | |
1102 | i*86:DYNIX/ptx:4*:*) | |
1103 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | |
1104 | # earlier versions are messed up and put the nodename in both | |
1105 | # sysname and nodename. | |
1106 | echo i386-sequent-sysv4 | |
1107 | exit ;; | |
1108 | i*86:UNIX_SV:4.2MP:2.*) | |
1109 | # Unixware is an offshoot of SVR4, but it has its own version | |
1110 | # number series starting with 2... | |
1111 | # I am not positive that other SVR4 systems won't match this, | |
1112 | # I just have to hope. -- rms. | |
1113 | # Use sysv4.2uw... so that sysv4* matches it. | |
1114 | echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
1115 | exit ;; | |
1116 | i*86:OS/2:*:*) | |
1117 | # If we were able to find `uname', then EMX Unix compatibility | |
1118 | # is probably installed. | |
1119 | echo "$UNAME_MACHINE"-pc-os2-emx | |
1120 | exit ;; | |
1121 | i*86:XTS-300:*:STOP) | |
1122 | echo "$UNAME_MACHINE"-unknown-stop | |
1123 | exit ;; | |
1124 | i*86:atheos:*:*) | |
1125 | echo "$UNAME_MACHINE"-unknown-atheos | |
1126 | exit ;; | |
1127 | i*86:syllable:*:*) | |
1128 | echo "$UNAME_MACHINE"-pc-syllable | |
1129 | exit ;; | |
1130 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | |
1131 | echo i386-unknown-lynxos"$UNAME_RELEASE" | |
1132 | exit ;; | |
1133 | i*86:*DOS:*:*) | |
1134 | echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
1135 | exit ;; | |
1136 | i*86:*:4.*:*) | |
1137 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` | |
1138 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | |
1139 | echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
1140 | else | |
1141 | echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
1142 | fi | |
1143 | exit ;; | |
1144 | i*86:*:5:[678]*) | |
1145 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1146 | case `/bin/uname -X | grep "^Machine"` in | |
1147 | *486*) UNAME_MACHINE=i486 ;; | |
1148 | *Pentium) UNAME_MACHINE=i586 ;; | |
1149 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | |
1150 | esac | |
1151 | echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" | |
1152 | exit ;; | |
1153 | i*86:*:3.2:*) | |
1154 | if test -f /usr/options/cb.name; then | |
1155 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | |
1156 | echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
1157 | elif /bin/uname -X 2>/dev/null >/dev/null ; then | |
1158 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | |
1159 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | |
1160 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | |
1161 | && UNAME_MACHINE=i586 | |
1162 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | |
1163 | && UNAME_MACHINE=i686 | |
1164 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | |
1165 | && UNAME_MACHINE=i686 | |
1166 | echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
1167 | else | |
1168 | echo "$UNAME_MACHINE"-pc-sysv32 | |
1169 | fi | |
1170 | exit ;; | |
1171 | pc:*:*:*) | |
1172 | # Left here for compatibility: | |
1173 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1174 | # the processor, so we play safe by assuming i586. | |
1175 | # Note: whatever this is, it MUST be the same as what config.sub | |
1176 | # prints for the "djgpp" host, or else GDB configure will decide that | |
1177 | # this is a cross-build. | |
1178 | echo i586-pc-msdosdjgpp | |
1179 | exit ;; | |
1180 | Intel:Mach:3*:*) | |
1181 | echo i386-pc-mach3 | |
1182 | exit ;; | |
1183 | paragon:*:*:*) | |
1184 | echo i860-intel-osf1 | |
1185 | exit ;; | |
1186 | i860:*:4.*:*) # i860-SVR4 | |
1187 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | |
1188 | echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
1189 | else # Add other i860-SVR4 vendors below as they are discovered. | |
1190 | echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
1191 | fi | |
1192 | exit ;; | |
1193 | mini*:CTIX:SYS*5:*) | |
1194 | # "miniframe" | |
1195 | echo m68010-convergent-sysv | |
1196 | exit ;; | |
1197 | mc68k:UNIX:SYSTEM5:3.51m) | |
1198 | echo m68k-convergent-sysv | |
1199 | exit ;; | |
1200 | M680?0:D-NIX:5.3:*) | |
1201 | echo m68k-diab-dnix | |
1202 | exit ;; | |
1203 | M68*:*:R3V[5678]*:*) | |
1204 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | |
1205 | 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) | |
1206 | OS_REL='' | |
1207 | test -r /etc/.relid \ | |
1208 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1209 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1210 | && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
1211 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1212 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
1213 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | |
1214 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1215 | && { echo i486-ncr-sysv4; exit; } ;; | |
1216 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) | |
1217 | OS_REL='.3' | |
1218 | test -r /etc/.relid \ | |
1219 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
1220 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1221 | && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } | |
1222 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
1223 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } | |
1224 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | |
1225 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; | |
1226 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | |
1227 | echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
1228 | exit ;; | |
1229 | mc68030:UNIX_System_V:4.*:*) | |
1230 | echo m68k-atari-sysv4 | |
1231 | exit ;; | |
1232 | TSUNAMI:LynxOS:2.*:*) | |
1233 | echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
1234 | exit ;; | |
1235 | rs6000:LynxOS:2.*:*) | |
1236 | echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
1237 | exit ;; | |
1238 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | |
1239 | echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
1240 | exit ;; | |
1241 | SM[BE]S:UNIX_SV:*:*) | |
1242 | echo mips-dde-sysv"$UNAME_RELEASE" | |
1243 | exit ;; | |
1244 | RM*:ReliantUNIX-*:*:*) | |
1245 | echo mips-sni-sysv4 | |
1246 | exit ;; | |
1247 | RM*:SINIX-*:*:*) | |
1248 | echo mips-sni-sysv4 | |
1249 | exit ;; | |
1250 | *:SINIX-*:*:*) | |
1251 | if uname -p 2>/dev/null >/dev/null ; then | |
1252 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1253 | echo "$UNAME_MACHINE"-sni-sysv4 | |
1254 | else | |
1255 | echo ns32k-sni-sysv | |
1256 | fi | |
1257 | exit ;; | |
1258 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1259 | # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1260 | echo i586-unisys-sysv4 | |
1261 | exit ;; | |
1262 | *:UNIX_System_V:4*:FTX*) | |
1263 | # From Gerald Hewes <hewes@openmarket.com>. | |
1264 | # How about differentiating between stratus architectures? -djm | |
1265 | echo hppa1.1-stratus-sysv4 | |
1266 | exit ;; | |
1267 | *:*:*:FTX*) | |
1268 | # From seanf@swdc.stratus.com. | |
1269 | echo i860-stratus-sysv4 | |
1270 | exit ;; | |
1271 | i*86:VOS:*:*) | |
1272 | # From Paul.Green@stratus.com. | |
1273 | echo "$UNAME_MACHINE"-stratus-vos | |
1274 | exit ;; | |
1275 | *:VOS:*:*) | |
1276 | # From Paul.Green@stratus.com. | |
1277 | echo hppa1.1-stratus-vos | |
1278 | exit ;; | |
1279 | mc68*:A/UX:*:*) | |
1280 | echo m68k-apple-aux"$UNAME_RELEASE" | |
1281 | exit ;; | |
1282 | news*:NEWS-OS:6*:*) | |
1283 | echo mips-sony-newsos6 | |
1284 | exit ;; | |
1285 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | |
1286 | if [ -d /usr/nec ]; then | |
1287 | echo mips-nec-sysv"$UNAME_RELEASE" | |
1288 | else | |
1289 | echo mips-unknown-sysv"$UNAME_RELEASE" | |
1290 | fi | |
1291 | exit ;; | |
1292 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | |
1293 | echo powerpc-be-beos | |
1294 | exit ;; | |
1295 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | |
1296 | echo powerpc-apple-beos | |
1297 | exit ;; | |
1298 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | |
1299 | echo i586-pc-beos | |
1300 | exit ;; | |
1301 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | |
1302 | echo i586-pc-haiku | |
1303 | exit ;; | |
1304 | x86_64:Haiku:*:*) | |
1305 | echo x86_64-unknown-haiku | |
1306 | exit ;; | |
1307 | SX-4:SUPER-UX:*:*) | |
1308 | echo sx4-nec-superux"$UNAME_RELEASE" | |
1309 | exit ;; | |
1310 | SX-5:SUPER-UX:*:*) | |
1311 | echo sx5-nec-superux"$UNAME_RELEASE" | |
1312 | exit ;; | |
1313 | SX-6:SUPER-UX:*:*) | |
1314 | echo sx6-nec-superux"$UNAME_RELEASE" | |
1315 | exit ;; | |
1316 | SX-7:SUPER-UX:*:*) | |
1317 | echo sx7-nec-superux"$UNAME_RELEASE" | |
1318 | exit ;; | |
1319 | SX-8:SUPER-UX:*:*) | |
1320 | echo sx8-nec-superux"$UNAME_RELEASE" | |
1321 | exit ;; | |
1322 | SX-8R:SUPER-UX:*:*) | |
1323 | echo sx8r-nec-superux"$UNAME_RELEASE" | |
1324 | exit ;; | |
1325 | SX-ACE:SUPER-UX:*:*) | |
1326 | echo sxace-nec-superux"$UNAME_RELEASE" | |
1327 | exit ;; | |
1328 | Power*:Rhapsody:*:*) | |
1329 | echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
1330 | exit ;; | |
1331 | *:Rhapsody:*:*) | |
1332 | echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
1333 | exit ;; | |
1334 | *:Darwin:*:*) | |
1335 | UNAME_PROCESSOR=`uname -p` | |
1336 | case $UNAME_PROCESSOR in | |
1337 | unknown) UNAME_PROCESSOR=powerpc ;; | |
1338 | esac | |
1339 | if command -v xcode-select > /dev/null 2> /dev/null && \ | |
1340 | ! xcode-select --print-path > /dev/null 2> /dev/null ; then | |
1341 | # Avoid executing cc if there is no toolchain installed as | |
1342 | # cc will be a stub that puts up a graphical alert | |
1343 | # prompting the user to install developer tools. | |
1344 | CC_FOR_BUILD=no_compiler_found | |
1345 | else | |
1346 | set_cc_for_build | |
1347 | fi | |
1348 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
1349 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1350 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1351 | grep IS_64BIT_ARCH >/dev/null | |
1352 | then | |
1353 | case $UNAME_PROCESSOR in | |
1354 | i386) UNAME_PROCESSOR=x86_64 ;; | |
1355 | powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
1356 | esac | |
1357 | fi | |
1358 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1359 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1360 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1361 | grep IS_PPC >/dev/null | |
1362 | then | |
1363 | UNAME_PROCESSOR=powerpc | |
1364 | fi | |
1365 | elif test "$UNAME_PROCESSOR" = i386 ; then | |
1366 | # uname -m returns i386 or x86_64 | |
1367 | UNAME_PROCESSOR=$UNAME_MACHINE | |
1368 | fi | |
1369 | echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | |
1370 | exit ;; | |
1371 | *:procnto*:*:* | *:QNX:[0123456789]*:*) | |
1372 | UNAME_PROCESSOR=`uname -p` | |
1373 | if test "$UNAME_PROCESSOR" = x86; then | |
1374 | UNAME_PROCESSOR=i386 | |
1375 | UNAME_MACHINE=pc | |
1376 | fi | |
1377 | echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
1378 | exit ;; | |
1379 | *:QNX:*:4*) | |
1380 | echo i386-pc-qnx | |
1381 | exit ;; | |
1382 | NEO-*:NONSTOP_KERNEL:*:*) | |
1383 | echo neo-tandem-nsk"$UNAME_RELEASE" | |
1384 | exit ;; | |
1385 | NSE-*:NONSTOP_KERNEL:*:*) | |
1386 | echo nse-tandem-nsk"$UNAME_RELEASE" | |
1387 | exit ;; | |
1388 | NSR-*:NONSTOP_KERNEL:*:*) | |
1389 | echo nsr-tandem-nsk"$UNAME_RELEASE" | |
1390 | exit ;; | |
1391 | NSV-*:NONSTOP_KERNEL:*:*) | |
1392 | echo nsv-tandem-nsk"$UNAME_RELEASE" | |
1393 | exit ;; | |
1394 | NSX-*:NONSTOP_KERNEL:*:*) | |
1395 | echo nsx-tandem-nsk"$UNAME_RELEASE" | |
1396 | exit ;; | |
1397 | *:NonStop-UX:*:*) | |
1398 | echo mips-compaq-nonstopux | |
1399 | exit ;; | |
1400 | BS2000:POSIX*:*:*) | |
1401 | echo bs2000-siemens-sysv | |
1402 | exit ;; | |
1403 | DS/*:UNIX_System_V:*:*) | |
1404 | echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
1405 | exit ;; | |
1406 | *:Plan9:*:*) | |
1407 | # "uname -m" is not consistent, so use $cputype instead. 386 | |
1408 | # is converted to i386 for consistency with other x86 | |
1409 | # operating systems. | |
1410 | # shellcheck disable=SC2154 | |
1411 | if test "$cputype" = 386; then | |
1412 | UNAME_MACHINE=i386 | |
1413 | else | |
1414 | UNAME_MACHINE="$cputype" | |
1415 | fi | |
1416 | echo "$UNAME_MACHINE"-unknown-plan9 | |
1417 | exit ;; | |
1418 | *:TOPS-10:*:*) | |
1419 | echo pdp10-unknown-tops10 | |
1420 | exit ;; | |
1421 | *:TENEX:*:*) | |
1422 | echo pdp10-unknown-tenex | |
1423 | exit ;; | |
1424 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | |
1425 | echo pdp10-dec-tops20 | |
1426 | exit ;; | |
1427 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | |
1428 | echo pdp10-xkl-tops20 | |
1429 | exit ;; | |
1430 | *:TOPS-20:*:*) | |
1431 | echo pdp10-unknown-tops20 | |
1432 | exit ;; | |
1433 | *:ITS:*:*) | |
1434 | echo pdp10-unknown-its | |
1435 | exit ;; | |
1436 | SEI:*:*:SEIUX) | |
1437 | echo mips-sei-seiux"$UNAME_RELEASE" | |
1438 | exit ;; | |
1439 | *:DragonFly:*:*) | |
1440 | echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
1441 | exit ;; | |
1442 | *:*VMS:*:*) | |
1443 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1444 | case "$UNAME_MACHINE" in | |
1445 | A*) echo alpha-dec-vms ; exit ;; | |
1446 | I*) echo ia64-dec-vms ; exit ;; | |
1447 | V*) echo vax-dec-vms ; exit ;; | |
1448 | esac ;; | |
1449 | *:XENIX:*:SysV) | |
1450 | echo i386-pc-xenix | |
1451 | exit ;; | |
1452 | i*86:skyos:*:*) | |
1453 | echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
1454 | exit ;; | |
1455 | i*86:rdos:*:*) | |
1456 | echo "$UNAME_MACHINE"-pc-rdos | |
1457 | exit ;; | |
1458 | i*86:AROS:*:*) | |
1459 | echo "$UNAME_MACHINE"-pc-aros | |
1460 | exit ;; | |
1461 | x86_64:VMkernel:*:*) | |
1462 | echo "$UNAME_MACHINE"-unknown-esx | |
1463 | exit ;; | |
1464 | amd64:Isilon\ OneFS:*:*) | |
1465 | echo x86_64-unknown-onefs | |
1466 | exit ;; | |
1467 | *:Unleashed:*:*) | |
1468 | echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" | |
1469 | exit ;; | |
1470 | esac | |
1471 | ||
1472 | # No uname command or uname output not recognized. | |
1473 | set_cc_for_build | |
1474 | cat > "$dummy.c" <<EOF | |
1475 | #ifdef _SEQUENT_ | |
1476 | #include <sys/types.h> | |
1477 | #include <sys/utsname.h> | |
1478 | #endif | |
1479 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1480 | #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1481 | #include <signal.h> | |
1482 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1483 | #include <sys/utsname.h> | |
1484 | #endif | |
1485 | #endif | |
1486 | #endif | |
1487 | main () | |
1488 | { | |
1489 | #if defined (sony) | |
1490 | #if defined (MIPSEB) | |
1491 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
1492 | I don't know.... */ | |
1493 | printf ("mips-sony-bsd\n"); exit (0); | |
1494 | #else | |
1495 | #include <sys/param.h> | |
1496 | printf ("m68k-sony-newsos%s\n", | |
1497 | #ifdef NEWSOS4 | |
1498 | "4" | |
1499 | #else | |
1500 | "" | |
1501 | #endif | |
1502 | ); exit (0); | |
1503 | #endif | |
1504 | #endif | |
1505 | ||
1506 | #if defined (NeXT) | |
1507 | #if !defined (__ARCHITECTURE__) | |
1508 | #define __ARCHITECTURE__ "m68k" | |
1509 | #endif | |
1510 | int version; | |
1511 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
1512 | if (version < 4) | |
1513 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
1514 | else | |
1515 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
1516 | exit (0); | |
1517 | #endif | |
1518 | ||
1519 | #if defined (MULTIMAX) || defined (n16) | |
1520 | #if defined (UMAXV) | |
1521 | printf ("ns32k-encore-sysv\n"); exit (0); | |
1522 | #else | |
1523 | #if defined (CMU) | |
1524 | printf ("ns32k-encore-mach\n"); exit (0); | |
1525 | #else | |
1526 | printf ("ns32k-encore-bsd\n"); exit (0); | |
1527 | #endif | |
1528 | #endif | |
1529 | #endif | |
1530 | ||
1531 | #if defined (__386BSD__) | |
1532 | printf ("i386-pc-bsd\n"); exit (0); | |
1533 | #endif | |
1534 | ||
1535 | #if defined (sequent) | |
1536 | #if defined (i386) | |
1537 | printf ("i386-sequent-dynix\n"); exit (0); | |
1538 | #endif | |
1539 | #if defined (ns32000) | |
1540 | printf ("ns32k-sequent-dynix\n"); exit (0); | |
1541 | #endif | |
1542 | #endif | |
1543 | ||
1544 | #if defined (_SEQUENT_) | |
1545 | struct utsname un; | |
1546 | ||
1547 | uname(&un); | |
1548 | if (strncmp(un.version, "V2", 2) == 0) { | |
1549 | printf ("i386-sequent-ptx2\n"); exit (0); | |
1550 | } | |
1551 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
1552 | printf ("i386-sequent-ptx1\n"); exit (0); | |
1553 | } | |
1554 | printf ("i386-sequent-ptx\n"); exit (0); | |
1555 | #endif | |
1556 | ||
1557 | #if defined (vax) | |
1558 | #if !defined (ultrix) | |
1559 | #include <sys/param.h> | |
1560 | #if defined (BSD) | |
1561 | #if BSD == 43 | |
1562 | printf ("vax-dec-bsd4.3\n"); exit (0); | |
1563 | #else | |
1564 | #if BSD == 199006 | |
1565 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
1566 | #else | |
1567 | printf ("vax-dec-bsd\n"); exit (0); | |
1568 | #endif | |
1569 | #endif | |
1570 | #else | |
1571 | printf ("vax-dec-bsd\n"); exit (0); | |
1572 | #endif | |
1573 | #else | |
1574 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1575 | struct utsname un; | |
1576 | uname (&un); | |
1577 | printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
1578 | #else | |
1579 | printf ("vax-dec-ultrix\n"); exit (0); | |
1580 | #endif | |
1581 | #endif | |
1582 | #endif | |
1583 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
1584 | #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
1585 | #if defined(_SIZE_T_) || defined(SIGLOST) | |
1586 | struct utsname *un; | |
1587 | uname (&un); | |
1588 | printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
1589 | #else | |
1590 | printf ("mips-dec-ultrix\n"); exit (0); | |
1591 | #endif | |
1592 | #endif | |
1593 | #endif | |
1594 | ||
1595 | #if defined (alliant) && defined (i860) | |
1596 | printf ("i860-alliant-bsd\n"); exit (0); | |
1597 | #endif | |
1598 | ||
1599 | exit (1); | |
1600 | } | |
1601 | EOF | |
1602 | ||
1603 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && | |
1604 | { echo "$SYSTEM_NAME"; exit; } | |
1605 | ||
1606 | # Apollos put the system type in the environment. | |
1607 | test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | |
1608 | ||
1609 | echo "$0: unable to guess system type" >&2 | |
1610 | ||
1611 | case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
1612 | mips:Linux | mips64:Linux) | |
1613 | # If we got here on MIPS GNU/Linux, output extra information. | |
1614 | cat >&2 <<EOF | |
1615 | ||
1616 | NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize | |
1617 | the system type. Please install a C compiler and try again. | |
1618 | EOF | |
1619 | ;; | |
1620 | esac | |
1621 | ||
1622 | cat >&2 <<EOF | |
1623 | ||
1624 | This script (version $timestamp), has failed to recognize the | |
1625 | operating system you are using. If your script is old, overwrite *all* | |
1626 | copies of config.guess and config.sub with the latest versions from: | |
1627 | ||
1628 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
1629 | and | |
1630 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
1631 | ||
1632 | If $0 has already been updated, send the following data and any | |
1633 | information you think might be pertinent to config-patches@gnu.org to | |
1634 | provide the necessary information to handle your system. | |
1635 | ||
1636 | config.guess timestamp = $timestamp | |
1637 | ||
1638 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1639 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1640 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1641 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1642 | ||
1643 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | |
1644 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null` | |
1645 | ||
1646 | hostinfo = `(hostinfo) 2>/dev/null` | |
1647 | /bin/universe = `(/bin/universe) 2>/dev/null` | |
1648 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | |
1649 | /bin/arch = `(/bin/arch) 2>/dev/null` | |
1650 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | |
1651 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | |
1652 | ||
1653 | UNAME_MACHINE = "$UNAME_MACHINE" | |
1654 | UNAME_RELEASE = "$UNAME_RELEASE" | |
1655 | UNAME_SYSTEM = "$UNAME_SYSTEM" | |
1656 | UNAME_VERSION = "$UNAME_VERSION" | |
1657 | EOF | |
1658 | ||
1659 | exit 1 | |
1660 | ||
1661 | # Local variables: | |
1662 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1663 | # time-stamp-start: "timestamp='" | |
1664 | # time-stamp-format: "%:y-%02m-%02d" | |
1665 | # time-stamp-end: "'" | |
1666 | # End: |
0 | /* config.h.in. Generated from configure.ac by autoheader. */ | |
1 | ||
2 | /* Define to 1 if you have the `atexit' function. */ | |
3 | #undef HAVE_ATEXIT | |
4 | ||
5 | /* Define to 1 if you have the `dup2' function. */ | |
6 | #undef HAVE_DUP2 | |
7 | ||
8 | /* Define to 1 if you have the `explicit_bzero' function. */ | |
9 | #undef HAVE_EXPLICIT_BZERO | |
10 | ||
11 | /* Define to 1 if you have the <fcntl.h> header file. */ | |
12 | #undef HAVE_FCNTL_H | |
13 | ||
14 | /* Define to 1 if you have the <float.h> header file. */ | |
15 | #undef HAVE_FLOAT_H | |
16 | ||
17 | /* Define to 1 if you have the `fork' function. */ | |
18 | #undef HAVE_FORK | |
19 | ||
20 | /* Define to 1 if you have the `ftruncate' function. */ | |
21 | #undef HAVE_FTRUNCATE | |
22 | ||
23 | /* Define to 1 if you have the `getcwd' function. */ | |
24 | #undef HAVE_GETCWD | |
25 | ||
26 | /* Define to 1 if you have the `gettimeofday' function. */ | |
27 | #undef HAVE_GETTIMEOFDAY | |
28 | ||
29 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
30 | #undef HAVE_INTTYPES_H | |
31 | ||
32 | /* Define to 1 if you have the <limits.h> header file. */ | |
33 | #undef HAVE_LIMITS_H | |
34 | ||
35 | /* Define to 1 if you have the <locale.h> header file. */ | |
36 | #undef HAVE_LOCALE_H | |
37 | ||
38 | /* Define to 1 if you have the `localtime_r' function. */ | |
39 | #undef HAVE_LOCALTIME_R | |
40 | ||
41 | /* Define to 1 if you have the `memchr' function. */ | |
42 | #undef HAVE_MEMCHR | |
43 | ||
44 | /* Define to 1 if you have the <memory.h> header file. */ | |
45 | #undef HAVE_MEMORY_H | |
46 | ||
47 | /* Define to 1 if you have the `memset' function. */ | |
48 | #undef HAVE_MEMSET | |
49 | ||
50 | /* Define to 1 if you have the `mkdir' function. */ | |
51 | #undef HAVE_MKDIR | |
52 | ||
53 | /* Define to 1 if the system has the type `mode_t'. */ | |
54 | #undef HAVE_MODE_T | |
55 | ||
56 | /* Define to 1 if you have the <netinet/in.h> header file. */ | |
57 | #undef HAVE_NETINET_IN_H | |
58 | ||
59 | /* Define to 1 if the system has the type `off_t'. */ | |
60 | #undef HAVE_OFF_T | |
61 | ||
62 | /* Define to 1 if you have the <paths.h> header file. */ | |
63 | #undef HAVE_PATHS_H | |
64 | ||
65 | /* Define to 1 if the system has the type `pid_t'. */ | |
66 | #undef HAVE_PID_T | |
67 | ||
68 | /* Define to 1 if you have the `rmdir' function. */ | |
69 | #undef HAVE_RMDIR | |
70 | ||
71 | /* Define to 1 if you have the `setlocale' function. */ | |
72 | #undef HAVE_SETLOCALE | |
73 | ||
74 | /* Define to 1 if the system has the type `size_t'. */ | |
75 | #undef HAVE_SIZE_T | |
76 | ||
77 | /* Define to 1 if you have the `socket' function. */ | |
78 | #undef HAVE_SOCKET | |
79 | ||
80 | /* Define to 1 if the system has the type `ssize_t'. */ | |
81 | #undef HAVE_SSIZE_T | |
82 | ||
83 | /* Define to 1 if you have the <stddef.h> header file. */ | |
84 | #undef HAVE_STDDEF_H | |
85 | ||
86 | /* Define to 1 if you have the <stdint.h> header file. */ | |
87 | #undef HAVE_STDINT_H | |
88 | ||
89 | /* Define to 1 if you have the <stdlib.h> header file. */ | |
90 | #undef HAVE_STDLIB_H | |
91 | ||
92 | /* Define to 1 if you have the `strcasecmp' function. */ | |
93 | #undef HAVE_STRCASECMP | |
94 | ||
95 | /* Define to 1 if you have the `strchr' function. */ | |
96 | #undef HAVE_STRCHR | |
97 | ||
98 | /* Define to 1 if you have the `strdup' function. */ | |
99 | #undef HAVE_STRDUP | |
100 | ||
101 | /* Define to 1 if you have the `strerror' function. */ | |
102 | #undef HAVE_STRERROR | |
103 | ||
104 | /* Define to 1 if you have the <strings.h> header file. */ | |
105 | #undef HAVE_STRINGS_H | |
106 | ||
107 | /* Define to 1 if you have the <string.h> header file. */ | |
108 | #undef HAVE_STRING_H | |
109 | ||
110 | /* Define to 1 if you have the `strncasecmp' function. */ | |
111 | #undef HAVE_STRNCASECMP | |
112 | ||
113 | /* Define to 1 if you have the `strndup' function. */ | |
114 | #undef HAVE_STRNDUP | |
115 | ||
116 | /* Define to 1 if you have the `strrchr' function. */ | |
117 | #undef HAVE_STRRCHR | |
118 | ||
119 | /* Define to 1 if you have the `strspn' function. */ | |
120 | #undef HAVE_STRSPN | |
121 | ||
122 | /* Define to 1 if you have the `strstr' function. */ | |
123 | #undef HAVE_STRSTR | |
124 | ||
125 | /* Define to 1 if you have the `strtol' function. */ | |
126 | #undef HAVE_STRTOL | |
127 | ||
128 | /* Define to 1 if you have the `strtoul' function. */ | |
129 | #undef HAVE_STRTOUL | |
130 | ||
131 | /* Define to 1 if you have the <sys/param.h> header file. */ | |
132 | #undef HAVE_SYS_PARAM_H | |
133 | ||
134 | /* Define to 1 if you have the <sys/socket.h> header file. */ | |
135 | #undef HAVE_SYS_SOCKET_H | |
136 | ||
137 | /* Define to 1 if you have the <sys/stat.h> header file. */ | |
138 | #undef HAVE_SYS_STAT_H | |
139 | ||
140 | /* Define to 1 if you have the <sys/time.h> header file. */ | |
141 | #undef HAVE_SYS_TIME_H | |
142 | ||
143 | /* Define to 1 if you have the <sys/types.h> header file. */ | |
144 | #undef HAVE_SYS_TYPES_H | |
145 | ||
146 | /* Define to 1 if you have the <unistd.h> header file. */ | |
147 | #undef HAVE_UNISTD_H | |
148 | ||
149 | /* Define to 1 if you have the `vfork' function. */ | |
150 | #undef HAVE_VFORK | |
151 | ||
152 | /* Define to 1 if you have the <vfork.h> header file. */ | |
153 | #undef HAVE_VFORK_H | |
154 | ||
155 | /* Define to 1 if `fork' works. */ | |
156 | #undef HAVE_WORKING_FORK | |
157 | ||
158 | /* Define to 1 if `vfork' works. */ | |
159 | #undef HAVE_WORKING_VFORK | |
160 | ||
161 | /* Define to 1 if the system has the type `_Bool'. */ | |
162 | #undef HAVE__BOOL | |
163 | ||
164 | /* Enable ASAN */ | |
165 | #undef I3LOCK_ASAN_ENABLED | |
166 | ||
167 | /* i3lock version */ | |
168 | #undef I3LOCK_VERSION | |
169 | ||
170 | /* Define to 1 if `lstat' dereferences a symlink specified with a trailing | |
171 | slash. */ | |
172 | #undef LSTAT_FOLLOWS_SLASHED_SYMLINK | |
173 | ||
174 | /* Name of package */ | |
175 | #undef PACKAGE | |
176 | ||
177 | /* Define to the address where bug reports for this package should be sent. */ | |
178 | #undef PACKAGE_BUGREPORT | |
179 | ||
180 | /* Define to the full name of this package. */ | |
181 | #undef PACKAGE_NAME | |
182 | ||
183 | /* Define to the full name and version of this package. */ | |
184 | #undef PACKAGE_STRING | |
185 | ||
186 | /* Define to the one symbol short name of this package. */ | |
187 | #undef PACKAGE_TARNAME | |
188 | ||
189 | /* Define to the home page for this package. */ | |
190 | #undef PACKAGE_URL | |
191 | ||
192 | /* Define to the version of this package. */ | |
193 | #undef PACKAGE_VERSION | |
194 | ||
195 | /* Define to 1 if you have the ANSI C header files. */ | |
196 | #undef STDC_HEADERS | |
197 | ||
198 | /* Define if debugging is disabled */ | |
199 | #undef UNUSED_NDEBUG | |
200 | ||
201 | /* Enable extensions on AIX 3, Interix. */ | |
202 | #ifndef _ALL_SOURCE | |
203 | # undef _ALL_SOURCE | |
204 | #endif | |
205 | /* Enable GNU extensions on systems that have them. */ | |
206 | #ifndef _GNU_SOURCE | |
207 | # undef _GNU_SOURCE | |
208 | #endif | |
209 | /* Enable threading extensions on Solaris. */ | |
210 | #ifndef _POSIX_PTHREAD_SEMANTICS | |
211 | # undef _POSIX_PTHREAD_SEMANTICS | |
212 | #endif | |
213 | /* Enable extensions on HP NonStop. */ | |
214 | #ifndef _TANDEM_SOURCE | |
215 | # undef _TANDEM_SOURCE | |
216 | #endif | |
217 | /* Enable general extensions on Solaris. */ | |
218 | #ifndef __EXTENSIONS__ | |
219 | # undef __EXTENSIONS__ | |
220 | #endif | |
221 | ||
222 | ||
223 | /* Version number of package */ | |
224 | #undef VERSION | |
225 | ||
226 | /* Define to 1 if on MINIX. */ | |
227 | #undef _MINIX | |
228 | ||
229 | /* Define to 2 if the system does not provide POSIX.1 features except with | |
230 | this defined. */ | |
231 | #undef _POSIX_1_SOURCE | |
232 | ||
233 | /* Define to 1 if you need to in order for `stat' and other things to work. */ | |
234 | #undef _POSIX_SOURCE | |
235 | ||
236 | /* Define to `int' if <sys/types.h> does not define. */ | |
237 | #undef pid_t | |
238 | ||
239 | /* Define as `fork' if `vfork' does not work. */ | |
240 | #undef vfork |
0 | #! /bin/sh | |
1 | # Configuration validation subroutine script. | |
2 | # Copyright 1992-2020 Free Software Foundation, Inc. | |
3 | ||
4 | timestamp='2020-01-01' | |
5 | ||
6 | # This file is free software; you can redistribute it and/or modify it | |
7 | # under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 3 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, see <https://www.gnu.org/licenses/>. | |
18 | # | |
19 | # As a special exception to the GNU General Public License, if you | |
20 | # distribute this file as part of a program that contains a | |
21 | # configuration script generated by Autoconf, you may include it under | |
22 | # the same distribution terms that you use for the rest of that | |
23 | # program. This Exception is an additional permission under section 7 | |
24 | # of the GNU General Public License, version 3 ("GPLv3"). | |
25 | ||
26 | ||
27 | # Please send patches to <config-patches@gnu.org>. | |
28 | # | |
29 | # Configuration subroutine to validate and canonicalize a configuration type. | |
30 | # Supply the specified configuration type as an argument. | |
31 | # If it is invalid, we print an error message on stderr and exit with code 1. | |
32 | # Otherwise, we print the canonical config type on stdout and succeed. | |
33 | ||
34 | # You can get the latest version of this script from: | |
35 | # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
36 | ||
37 | # This file is supposed to be the same for all GNU packages | |
38 | # and recognize all the CPU types, system types and aliases | |
39 | # that are meaningful with *any* GNU software. | |
40 | # Each package is responsible for reporting which valid configurations | |
41 | # it does not support. The user should be able to distinguish | |
42 | # a failure to support a valid configuration from a meaningless | |
43 | # configuration. | |
44 | ||
45 | # The goal of this file is to map all the various variations of a given | |
46 | # machine specification into a single specification in the form: | |
47 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
48 | # or in some cases, the newer four-part form: | |
49 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
50 | # It is wrong to echo any other type of specification. | |
51 | ||
52 | me=`echo "$0" | sed -e 's,.*/,,'` | |
53 | ||
54 | usage="\ | |
55 | Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS | |
56 | ||
57 | Canonicalize a configuration name. | |
58 | ||
59 | Options: | |
60 | -h, --help print this help, then exit | |
61 | -t, --time-stamp print date of last modification, then exit | |
62 | -v, --version print version number, then exit | |
63 | ||
64 | Report bugs and patches to <config-patches@gnu.org>." | |
65 | ||
66 | version="\ | |
67 | GNU config.sub ($timestamp) | |
68 | ||
69 | Copyright 1992-2020 Free Software Foundation, Inc. | |
70 | ||
71 | This is free software; see the source for copying conditions. There is NO | |
72 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
73 | ||
74 | help=" | |
75 | Try \`$me --help' for more information." | |
76 | ||
77 | # Parse command line | |
78 | while test $# -gt 0 ; do | |
79 | case $1 in | |
80 | --time-stamp | --time* | -t ) | |
81 | echo "$timestamp" ; exit ;; | |
82 | --version | -v ) | |
83 | echo "$version" ; exit ;; | |
84 | --help | --h* | -h ) | |
85 | echo "$usage"; exit ;; | |
86 | -- ) # Stop option processing | |
87 | shift; break ;; | |
88 | - ) # Use stdin as input. | |
89 | break ;; | |
90 | -* ) | |
91 | echo "$me: invalid option $1$help" >&2 | |
92 | exit 1 ;; | |
93 | ||
94 | *local*) | |
95 | # First pass through any local machine types. | |
96 | echo "$1" | |
97 | exit ;; | |
98 | ||
99 | * ) | |
100 | break ;; | |
101 | esac | |
102 | done | |
103 | ||
104 | case $# in | |
105 | 0) echo "$me: missing argument$help" >&2 | |
106 | exit 1;; | |
107 | 1) ;; | |
108 | *) echo "$me: too many arguments$help" >&2 | |
109 | exit 1;; | |
110 | esac | |
111 | ||
112 | # Split fields of configuration type | |
113 | # shellcheck disable=SC2162 | |
114 | IFS="-" read field1 field2 field3 field4 <<EOF | |
115 | $1 | |
116 | EOF | |
117 | ||
118 | # Separate into logical components for further validation | |
119 | case $1 in | |
120 | *-*-*-*-*) | |
121 | echo Invalid configuration \`"$1"\': more than four components >&2 | |
122 | exit 1 | |
123 | ;; | |
124 | *-*-*-*) | |
125 | basic_machine=$field1-$field2 | |
126 | os=$field3-$field4 | |
127 | ;; | |
128 | *-*-*) | |
129 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
130 | # parts | |
131 | maybe_os=$field2-$field3 | |
132 | case $maybe_os in | |
133 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ | |
134 | | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ | |
135 | | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
136 | | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
137 | | storm-chaos* | os2-emx* | rtmk-nova*) | |
138 | basic_machine=$field1 | |
139 | os=$maybe_os | |
140 | ;; | |
141 | android-linux) | |
142 | basic_machine=$field1-unknown | |
143 | os=linux-android | |
144 | ;; | |
145 | *) | |
146 | basic_machine=$field1-$field2 | |
147 | os=$field3 | |
148 | ;; | |
149 | esac | |
150 | ;; | |
151 | *-*) | |
152 | # A lone config we happen to match not fitting any pattern | |
153 | case $field1-$field2 in | |
154 | decstation-3100) | |
155 | basic_machine=mips-dec | |
156 | os= | |
157 | ;; | |
158 | *-*) | |
159 | # Second component is usually, but not always the OS | |
160 | case $field2 in | |
161 | # Prevent following clause from handling this valid os | |
162 | sun*os*) | |
163 | basic_machine=$field1 | |
164 | os=$field2 | |
165 | ;; | |
166 | # Manufacturers | |
167 | dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
168 | | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
169 | | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
170 | | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
171 | | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
172 | | ultra | tti* | harris | dolphin | highlevel | gould \ | |
173 | | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
174 | | microblaze* | sim | cisco \ | |
175 | | oki | wec | wrs | winbond) | |
176 | basic_machine=$field1-$field2 | |
177 | os= | |
178 | ;; | |
179 | *) | |
180 | basic_machine=$field1 | |
181 | os=$field2 | |
182 | ;; | |
183 | esac | |
184 | ;; | |
185 | esac | |
186 | ;; | |
187 | *) | |
188 | # Convert single-component short-hands not valid as part of | |
189 | # multi-component configurations. | |
190 | case $field1 in | |
191 | 386bsd) | |
192 | basic_machine=i386-pc | |
193 | os=bsd | |
194 | ;; | |
195 | a29khif) | |
196 | basic_machine=a29k-amd | |
197 | os=udi | |
198 | ;; | |
199 | adobe68k) | |
200 | basic_machine=m68010-adobe | |
201 | os=scout | |
202 | ;; | |
203 | alliant) | |
204 | basic_machine=fx80-alliant | |
205 | os= | |
206 | ;; | |
207 | altos | altos3068) | |
208 | basic_machine=m68k-altos | |
209 | os= | |
210 | ;; | |
211 | am29k) | |
212 | basic_machine=a29k-none | |
213 | os=bsd | |
214 | ;; | |
215 | amdahl) | |
216 | basic_machine=580-amdahl | |
217 | os=sysv | |
218 | ;; | |
219 | amiga) | |
220 | basic_machine=m68k-unknown | |
221 | os= | |
222 | ;; | |
223 | amigaos | amigados) | |
224 | basic_machine=m68k-unknown | |
225 | os=amigaos | |
226 | ;; | |
227 | amigaunix | amix) | |
228 | basic_machine=m68k-unknown | |
229 | os=sysv4 | |
230 | ;; | |
231 | apollo68) | |
232 | basic_machine=m68k-apollo | |
233 | os=sysv | |
234 | ;; | |
235 | apollo68bsd) | |
236 | basic_machine=m68k-apollo | |
237 | os=bsd | |
238 | ;; | |
239 | aros) | |
240 | basic_machine=i386-pc | |
241 | os=aros | |
242 | ;; | |
243 | aux) | |
244 | basic_machine=m68k-apple | |
245 | os=aux | |
246 | ;; | |
247 | balance) | |
248 | basic_machine=ns32k-sequent | |
249 | os=dynix | |
250 | ;; | |
251 | blackfin) | |
252 | basic_machine=bfin-unknown | |
253 | os=linux | |
254 | ;; | |
255 | cegcc) | |
256 | basic_machine=arm-unknown | |
257 | os=cegcc | |
258 | ;; | |
259 | convex-c1) | |
260 | basic_machine=c1-convex | |
261 | os=bsd | |
262 | ;; | |
263 | convex-c2) | |
264 | basic_machine=c2-convex | |
265 | os=bsd | |
266 | ;; | |
267 | convex-c32) | |
268 | basic_machine=c32-convex | |
269 | os=bsd | |
270 | ;; | |
271 | convex-c34) | |
272 | basic_machine=c34-convex | |
273 | os=bsd | |
274 | ;; | |
275 | convex-c38) | |
276 | basic_machine=c38-convex | |
277 | os=bsd | |
278 | ;; | |
279 | cray) | |
280 | basic_machine=j90-cray | |
281 | os=unicos | |
282 | ;; | |
283 | crds | unos) | |
284 | basic_machine=m68k-crds | |
285 | os= | |
286 | ;; | |
287 | da30) | |
288 | basic_machine=m68k-da30 | |
289 | os= | |
290 | ;; | |
291 | decstation | pmax | pmin | dec3100 | decstatn) | |
292 | basic_machine=mips-dec | |
293 | os= | |
294 | ;; | |
295 | delta88) | |
296 | basic_machine=m88k-motorola | |
297 | os=sysv3 | |
298 | ;; | |
299 | dicos) | |
300 | basic_machine=i686-pc | |
301 | os=dicos | |
302 | ;; | |
303 | djgpp) | |
304 | basic_machine=i586-pc | |
305 | os=msdosdjgpp | |
306 | ;; | |
307 | ebmon29k) | |
308 | basic_machine=a29k-amd | |
309 | os=ebmon | |
310 | ;; | |
311 | es1800 | OSE68k | ose68k | ose | OSE) | |
312 | basic_machine=m68k-ericsson | |
313 | os=ose | |
314 | ;; | |
315 | gmicro) | |
316 | basic_machine=tron-gmicro | |
317 | os=sysv | |
318 | ;; | |
319 | go32) | |
320 | basic_machine=i386-pc | |
321 | os=go32 | |
322 | ;; | |
323 | h8300hms) | |
324 | basic_machine=h8300-hitachi | |
325 | os=hms | |
326 | ;; | |
327 | h8300xray) | |
328 | basic_machine=h8300-hitachi | |
329 | os=xray | |
330 | ;; | |
331 | h8500hms) | |
332 | basic_machine=h8500-hitachi | |
333 | os=hms | |
334 | ;; | |
335 | harris) | |
336 | basic_machine=m88k-harris | |
337 | os=sysv3 | |
338 | ;; | |
339 | hp300 | hp300hpux) | |
340 | basic_machine=m68k-hp | |
341 | os=hpux | |
342 | ;; | |
343 | hp300bsd) | |
344 | basic_machine=m68k-hp | |
345 | os=bsd | |
346 | ;; | |
347 | hppaosf) | |
348 | basic_machine=hppa1.1-hp | |
349 | os=osf | |
350 | ;; | |
351 | hppro) | |
352 | basic_machine=hppa1.1-hp | |
353 | os=proelf | |
354 | ;; | |
355 | i386mach) | |
356 | basic_machine=i386-mach | |
357 | os=mach | |
358 | ;; | |
359 | isi68 | isi) | |
360 | basic_machine=m68k-isi | |
361 | os=sysv | |
362 | ;; | |
363 | m68knommu) | |
364 | basic_machine=m68k-unknown | |
365 | os=linux | |
366 | ;; | |
367 | magnum | m3230) | |
368 | basic_machine=mips-mips | |
369 | os=sysv | |
370 | ;; | |
371 | merlin) | |
372 | basic_machine=ns32k-utek | |
373 | os=sysv | |
374 | ;; | |
375 | mingw64) | |
376 | basic_machine=x86_64-pc | |
377 | os=mingw64 | |
378 | ;; | |
379 | mingw32) | |
380 | basic_machine=i686-pc | |
381 | os=mingw32 | |
382 | ;; | |
383 | mingw32ce) | |
384 | basic_machine=arm-unknown | |
385 | os=mingw32ce | |
386 | ;; | |
387 | monitor) | |
388 | basic_machine=m68k-rom68k | |
389 | os=coff | |
390 | ;; | |
391 | morphos) | |
392 | basic_machine=powerpc-unknown | |
393 | os=morphos | |
394 | ;; | |
395 | moxiebox) | |
396 | basic_machine=moxie-unknown | |
397 | os=moxiebox | |
398 | ;; | |
399 | msdos) | |
400 | basic_machine=i386-pc | |
401 | os=msdos | |
402 | ;; | |
403 | msys) | |
404 | basic_machine=i686-pc | |
405 | os=msys | |
406 | ;; | |
407 | mvs) | |
408 | basic_machine=i370-ibm | |
409 | os=mvs | |
410 | ;; | |
411 | nacl) | |
412 | basic_machine=le32-unknown | |
413 | os=nacl | |
414 | ;; | |
415 | ncr3000) | |
416 | basic_machine=i486-ncr | |
417 | os=sysv4 | |
418 | ;; | |
419 | netbsd386) | |
420 | basic_machine=i386-pc | |
421 | os=netbsd | |
422 | ;; | |
423 | netwinder) | |
424 | basic_machine=armv4l-rebel | |
425 | os=linux | |
426 | ;; | |
427 | news | news700 | news800 | news900) | |
428 | basic_machine=m68k-sony | |
429 | os=newsos | |
430 | ;; | |
431 | news1000) | |
432 | basic_machine=m68030-sony | |
433 | os=newsos | |
434 | ;; | |
435 | necv70) | |
436 | basic_machine=v70-nec | |
437 | os=sysv | |
438 | ;; | |
439 | nh3000) | |
440 | basic_machine=m68k-harris | |
441 | os=cxux | |
442 | ;; | |
443 | nh[45]000) | |
444 | basic_machine=m88k-harris | |
445 | os=cxux | |
446 | ;; | |
447 | nindy960) | |
448 | basic_machine=i960-intel | |
449 | os=nindy | |
450 | ;; | |
451 | mon960) | |
452 | basic_machine=i960-intel | |
453 | os=mon960 | |
454 | ;; | |
455 | nonstopux) | |
456 | basic_machine=mips-compaq | |
457 | os=nonstopux | |
458 | ;; | |
459 | os400) | |
460 | basic_machine=powerpc-ibm | |
461 | os=os400 | |
462 | ;; | |
463 | OSE68000 | ose68000) | |
464 | basic_machine=m68000-ericsson | |
465 | os=ose | |
466 | ;; | |
467 | os68k) | |
468 | basic_machine=m68k-none | |
469 | os=os68k | |
470 | ;; | |
471 | paragon) | |
472 | basic_machine=i860-intel | |
473 | os=osf | |
474 | ;; | |
475 | parisc) | |
476 | basic_machine=hppa-unknown | |
477 | os=linux | |
478 | ;; | |
479 | pw32) | |
480 | basic_machine=i586-unknown | |
481 | os=pw32 | |
482 | ;; | |
483 | rdos | rdos64) | |
484 | basic_machine=x86_64-pc | |
485 | os=rdos | |
486 | ;; | |
487 | rdos32) | |
488 | basic_machine=i386-pc | |
489 | os=rdos | |
490 | ;; | |
491 | rom68k) | |
492 | basic_machine=m68k-rom68k | |
493 | os=coff | |
494 | ;; | |
495 | sa29200) | |
496 | basic_machine=a29k-amd | |
497 | os=udi | |
498 | ;; | |
499 | sei) | |
500 | basic_machine=mips-sei | |
501 | os=seiux | |
502 | ;; | |
503 | sequent) | |
504 | basic_machine=i386-sequent | |
505 | os= | |
506 | ;; | |
507 | sps7) | |
508 | basic_machine=m68k-bull | |
509 | os=sysv2 | |
510 | ;; | |
511 | st2000) | |
512 | basic_machine=m68k-tandem | |
513 | os= | |
514 | ;; | |
515 | stratus) | |
516 | basic_machine=i860-stratus | |
517 | os=sysv4 | |
518 | ;; | |
519 | sun2) | |
520 | basic_machine=m68000-sun | |
521 | os= | |
522 | ;; | |
523 | sun2os3) | |
524 | basic_machine=m68000-sun | |
525 | os=sunos3 | |
526 | ;; | |
527 | sun2os4) | |
528 | basic_machine=m68000-sun | |
529 | os=sunos4 | |
530 | ;; | |
531 | sun3) | |
532 | basic_machine=m68k-sun | |
533 | os= | |
534 | ;; | |
535 | sun3os3) | |
536 | basic_machine=m68k-sun | |
537 | os=sunos3 | |
538 | ;; | |
539 | sun3os4) | |
540 | basic_machine=m68k-sun | |
541 | os=sunos4 | |
542 | ;; | |
543 | sun4) | |
544 | basic_machine=sparc-sun | |
545 | os= | |
546 | ;; | |
547 | sun4os3) | |
548 | basic_machine=sparc-sun | |
549 | os=sunos3 | |
550 | ;; | |
551 | sun4os4) | |
552 | basic_machine=sparc-sun | |
553 | os=sunos4 | |
554 | ;; | |
555 | sun4sol2) | |
556 | basic_machine=sparc-sun | |
557 | os=solaris2 | |
558 | ;; | |
559 | sun386 | sun386i | roadrunner) | |
560 | basic_machine=i386-sun | |
561 | os= | |
562 | ;; | |
563 | sv1) | |
564 | basic_machine=sv1-cray | |
565 | os=unicos | |
566 | ;; | |
567 | symmetry) | |
568 | basic_machine=i386-sequent | |
569 | os=dynix | |
570 | ;; | |
571 | t3e) | |
572 | basic_machine=alphaev5-cray | |
573 | os=unicos | |
574 | ;; | |
575 | t90) | |
576 | basic_machine=t90-cray | |
577 | os=unicos | |
578 | ;; | |
579 | toad1) | |
580 | basic_machine=pdp10-xkl | |
581 | os=tops20 | |
582 | ;; | |
583 | tpf) | |
584 | basic_machine=s390x-ibm | |
585 | os=tpf | |
586 | ;; | |
587 | udi29k) | |
588 | basic_machine=a29k-amd | |
589 | os=udi | |
590 | ;; | |
591 | ultra3) | |
592 | basic_machine=a29k-nyu | |
593 | os=sym1 | |
594 | ;; | |
595 | v810 | necv810) | |
596 | basic_machine=v810-nec | |
597 | os=none | |
598 | ;; | |
599 | vaxv) | |
600 | basic_machine=vax-dec | |
601 | os=sysv | |
602 | ;; | |
603 | vms) | |
604 | basic_machine=vax-dec | |
605 | os=vms | |
606 | ;; | |
607 | vsta) | |
608 | basic_machine=i386-pc | |
609 | os=vsta | |
610 | ;; | |
611 | vxworks960) | |
612 | basic_machine=i960-wrs | |
613 | os=vxworks | |
614 | ;; | |
615 | vxworks68) | |
616 | basic_machine=m68k-wrs | |
617 | os=vxworks | |
618 | ;; | |
619 | vxworks29k) | |
620 | basic_machine=a29k-wrs | |
621 | os=vxworks | |
622 | ;; | |
623 | xbox) | |
624 | basic_machine=i686-pc | |
625 | os=mingw32 | |
626 | ;; | |
627 | ymp) | |
628 | basic_machine=ymp-cray | |
629 | os=unicos | |
630 | ;; | |
631 | *) | |
632 | basic_machine=$1 | |
633 | os= | |
634 | ;; | |
635 | esac | |
636 | ;; | |
637 | esac | |
638 | ||
639 | # Decode 1-component or ad-hoc basic machines | |
640 | case $basic_machine in | |
641 | # Here we handle the default manufacturer of certain CPU types. It is in | |
642 | # some cases the only manufacturer, in others, it is the most popular. | |
643 | w89k) | |
644 | cpu=hppa1.1 | |
645 | vendor=winbond | |
646 | ;; | |
647 | op50n) | |
648 | cpu=hppa1.1 | |
649 | vendor=oki | |
650 | ;; | |
651 | op60c) | |
652 | cpu=hppa1.1 | |
653 | vendor=oki | |
654 | ;; | |
655 | ibm*) | |
656 | cpu=i370 | |
657 | vendor=ibm | |
658 | ;; | |
659 | orion105) | |
660 | cpu=clipper | |
661 | vendor=highlevel | |
662 | ;; | |
663 | mac | mpw | mac-mpw) | |
664 | cpu=m68k | |
665 | vendor=apple | |
666 | ;; | |
667 | pmac | pmac-mpw) | |
668 | cpu=powerpc | |
669 | vendor=apple | |
670 | ;; | |
671 | ||
672 | # Recognize the various machine names and aliases which stand | |
673 | # for a CPU type and a company and sometimes even an OS. | |
674 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
675 | cpu=m68000 | |
676 | vendor=att | |
677 | ;; | |
678 | 3b*) | |
679 | cpu=we32k | |
680 | vendor=att | |
681 | ;; | |
682 | bluegene*) | |
683 | cpu=powerpc | |
684 | vendor=ibm | |
685 | os=cnk | |
686 | ;; | |
687 | decsystem10* | dec10*) | |
688 | cpu=pdp10 | |
689 | vendor=dec | |
690 | os=tops10 | |
691 | ;; | |
692 | decsystem20* | dec20*) | |
693 | cpu=pdp10 | |
694 | vendor=dec | |
695 | os=tops20 | |
696 | ;; | |
697 | delta | 3300 | motorola-3300 | motorola-delta \ | |
698 | | 3300-motorola | delta-motorola) | |
699 | cpu=m68k | |
700 | vendor=motorola | |
701 | ;; | |
702 | dpx2*) | |
703 | cpu=m68k | |
704 | vendor=bull | |
705 | os=sysv3 | |
706 | ;; | |
707 | encore | umax | mmax) | |
708 | cpu=ns32k | |
709 | vendor=encore | |
710 | ;; | |
711 | elxsi) | |
712 | cpu=elxsi | |
713 | vendor=elxsi | |
714 | os=${os:-bsd} | |
715 | ;; | |
716 | fx2800) | |
717 | cpu=i860 | |
718 | vendor=alliant | |
719 | ;; | |
720 | genix) | |
721 | cpu=ns32k | |
722 | vendor=ns | |
723 | ;; | |
724 | h3050r* | hiux*) | |
725 | cpu=hppa1.1 | |
726 | vendor=hitachi | |
727 | os=hiuxwe2 | |
728 | ;; | |
729 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
730 | cpu=hppa1.0 | |
731 | vendor=hp | |
732 | ;; | |
733 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
734 | cpu=m68000 | |
735 | vendor=hp | |
736 | ;; | |
737 | hp9k3[2-9][0-9]) | |
738 | cpu=m68k | |
739 | vendor=hp | |
740 | ;; | |
741 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
742 | cpu=hppa1.0 | |
743 | vendor=hp | |
744 | ;; | |
745 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
746 | cpu=hppa1.1 | |
747 | vendor=hp | |
748 | ;; | |
749 | hp9k78[0-9] | hp78[0-9]) | |
750 | # FIXME: really hppa2.0-hp | |
751 | cpu=hppa1.1 | |
752 | vendor=hp | |
753 | ;; | |
754 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
755 | # FIXME: really hppa2.0-hp | |
756 | cpu=hppa1.1 | |
757 | vendor=hp | |
758 | ;; | |
759 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
760 | cpu=hppa1.1 | |
761 | vendor=hp | |
762 | ;; | |
763 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
764 | cpu=hppa1.0 | |
765 | vendor=hp | |
766 | ;; | |
767 | i*86v32) | |
768 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
769 | vendor=pc | |
770 | os=sysv32 | |
771 | ;; | |
772 | i*86v4*) | |
773 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
774 | vendor=pc | |
775 | os=sysv4 | |
776 | ;; | |
777 | i*86v) | |
778 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
779 | vendor=pc | |
780 | os=sysv | |
781 | ;; | |
782 | i*86sol2) | |
783 | cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
784 | vendor=pc | |
785 | os=solaris2 | |
786 | ;; | |
787 | j90 | j90-cray) | |
788 | cpu=j90 | |
789 | vendor=cray | |
790 | os=${os:-unicos} | |
791 | ;; | |
792 | iris | iris4d) | |
793 | cpu=mips | |
794 | vendor=sgi | |
795 | case $os in | |
796 | irix*) | |
797 | ;; | |
798 | *) | |
799 | os=irix4 | |
800 | ;; | |
801 | esac | |
802 | ;; | |
803 | miniframe) | |
804 | cpu=m68000 | |
805 | vendor=convergent | |
806 | ;; | |
807 | *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
808 | cpu=m68k | |
809 | vendor=atari | |
810 | os=mint | |
811 | ;; | |
812 | news-3600 | risc-news) | |
813 | cpu=mips | |
814 | vendor=sony | |
815 | os=newsos | |
816 | ;; | |
817 | next | m*-next) | |
818 | cpu=m68k | |
819 | vendor=next | |
820 | case $os in | |
821 | openstep*) | |
822 | ;; | |
823 | nextstep*) | |
824 | ;; | |
825 | ns2*) | |
826 | os=nextstep2 | |
827 | ;; | |
828 | *) | |
829 | os=nextstep3 | |
830 | ;; | |
831 | esac | |
832 | ;; | |
833 | np1) | |
834 | cpu=np1 | |
835 | vendor=gould | |
836 | ;; | |
837 | op50n-* | op60c-*) | |
838 | cpu=hppa1.1 | |
839 | vendor=oki | |
840 | os=proelf | |
841 | ;; | |
842 | pa-hitachi) | |
843 | cpu=hppa1.1 | |
844 | vendor=hitachi | |
845 | os=hiuxwe2 | |
846 | ;; | |
847 | pbd) | |
848 | cpu=sparc | |
849 | vendor=tti | |
850 | ;; | |
851 | pbb) | |
852 | cpu=m68k | |
853 | vendor=tti | |
854 | ;; | |
855 | pc532) | |
856 | cpu=ns32k | |
857 | vendor=pc532 | |
858 | ;; | |
859 | pn) | |
860 | cpu=pn | |
861 | vendor=gould | |
862 | ;; | |
863 | power) | |
864 | cpu=power | |
865 | vendor=ibm | |
866 | ;; | |
867 | ps2) | |
868 | cpu=i386 | |
869 | vendor=ibm | |
870 | ;; | |
871 | rm[46]00) | |
872 | cpu=mips | |
873 | vendor=siemens | |
874 | ;; | |
875 | rtpc | rtpc-*) | |
876 | cpu=romp | |
877 | vendor=ibm | |
878 | ;; | |
879 | sde) | |
880 | cpu=mipsisa32 | |
881 | vendor=sde | |
882 | os=${os:-elf} | |
883 | ;; | |
884 | simso-wrs) | |
885 | cpu=sparclite | |
886 | vendor=wrs | |
887 | os=vxworks | |
888 | ;; | |
889 | tower | tower-32) | |
890 | cpu=m68k | |
891 | vendor=ncr | |
892 | ;; | |
893 | vpp*|vx|vx-*) | |
894 | cpu=f301 | |
895 | vendor=fujitsu | |
896 | ;; | |
897 | w65) | |
898 | cpu=w65 | |
899 | vendor=wdc | |
900 | ;; | |
901 | w89k-*) | |
902 | cpu=hppa1.1 | |
903 | vendor=winbond | |
904 | os=proelf | |
905 | ;; | |
906 | none) | |
907 | cpu=none | |
908 | vendor=none | |
909 | ;; | |
910 | leon|leon[3-9]) | |
911 | cpu=sparc | |
912 | vendor=$basic_machine | |
913 | ;; | |
914 | leon-*|leon[3-9]-*) | |
915 | cpu=sparc | |
916 | vendor=`echo "$basic_machine" | sed 's/-.*//'` | |
917 | ;; | |
918 | ||
919 | *-*) | |
920 | # shellcheck disable=SC2162 | |
921 | IFS="-" read cpu vendor <<EOF | |
922 | $basic_machine | |
923 | EOF | |
924 | ;; | |
925 | # We use `pc' rather than `unknown' | |
926 | # because (1) that's what they normally are, and | |
927 | # (2) the word "unknown" tends to confuse beginning users. | |
928 | i*86 | x86_64) | |
929 | cpu=$basic_machine | |
930 | vendor=pc | |
931 | ;; | |
932 | # These rules are duplicated from below for sake of the special case above; | |
933 | # i.e. things that normalized to x86 arches should also default to "pc" | |
934 | pc98) | |
935 | cpu=i386 | |
936 | vendor=pc | |
937 | ;; | |
938 | x64 | amd64) | |
939 | cpu=x86_64 | |
940 | vendor=pc | |
941 | ;; | |
942 | # Recognize the basic CPU types without company name. | |
943 | *) | |
944 | cpu=$basic_machine | |
945 | vendor=unknown | |
946 | ;; | |
947 | esac | |
948 | ||
949 | unset -v basic_machine | |
950 | ||
951 | # Decode basic machines in the full and proper CPU-Company form. | |
952 | case $cpu-$vendor in | |
953 | # Here we handle the default manufacturer of certain CPU types in canonical form. It is in | |
954 | # some cases the only manufacturer, in others, it is the most popular. | |
955 | craynv-unknown) | |
956 | vendor=cray | |
957 | os=${os:-unicosmp} | |
958 | ;; | |
959 | c90-unknown | c90-cray) | |
960 | vendor=cray | |
961 | os=${os:-unicos} | |
962 | ;; | |
963 | fx80-unknown) | |
964 | vendor=alliant | |
965 | ;; | |
966 | romp-unknown) | |
967 | vendor=ibm | |
968 | ;; | |
969 | mmix-unknown) | |
970 | vendor=knuth | |
971 | ;; | |
972 | microblaze-unknown | microblazeel-unknown) | |
973 | vendor=xilinx | |
974 | ;; | |
975 | rs6000-unknown) | |
976 | vendor=ibm | |
977 | ;; | |
978 | vax-unknown) | |
979 | vendor=dec | |
980 | ;; | |
981 | pdp11-unknown) | |
982 | vendor=dec | |
983 | ;; | |
984 | we32k-unknown) | |
985 | vendor=att | |
986 | ;; | |
987 | cydra-unknown) | |
988 | vendor=cydrome | |
989 | ;; | |
990 | i370-ibm*) | |
991 | vendor=ibm | |
992 | ;; | |
993 | orion-unknown) | |
994 | vendor=highlevel | |
995 | ;; | |
996 | xps-unknown | xps100-unknown) | |
997 | cpu=xps100 | |
998 | vendor=honeywell | |
999 | ;; | |
1000 | ||
1001 | # Here we normalize CPU types with a missing or matching vendor | |
1002 | dpx20-unknown | dpx20-bull) | |
1003 | cpu=rs6000 | |
1004 | vendor=bull | |
1005 | os=${os:-bosx} | |
1006 | ;; | |
1007 | ||
1008 | # Here we normalize CPU types irrespective of the vendor | |
1009 | amd64-*) | |
1010 | cpu=x86_64 | |
1011 | ;; | |
1012 | blackfin-*) | |
1013 | cpu=bfin | |
1014 | os=linux | |
1015 | ;; | |
1016 | c54x-*) | |
1017 | cpu=tic54x | |
1018 | ;; | |
1019 | c55x-*) | |
1020 | cpu=tic55x | |
1021 | ;; | |
1022 | c6x-*) | |
1023 | cpu=tic6x | |
1024 | ;; | |
1025 | e500v[12]-*) | |
1026 | cpu=powerpc | |
1027 | os=$os"spe" | |
1028 | ;; | |
1029 | mips3*-*) | |
1030 | cpu=mips64 | |
1031 | ;; | |
1032 | ms1-*) | |
1033 | cpu=mt | |
1034 | ;; | |
1035 | m68knommu-*) | |
1036 | cpu=m68k | |
1037 | os=linux | |
1038 | ;; | |
1039 | m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) | |
1040 | cpu=s12z | |
1041 | ;; | |
1042 | openrisc-*) | |
1043 | cpu=or32 | |
1044 | ;; | |
1045 | parisc-*) | |
1046 | cpu=hppa | |
1047 | os=linux | |
1048 | ;; | |
1049 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
1050 | cpu=i586 | |
1051 | ;; | |
1052 | pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) | |
1053 | cpu=i686 | |
1054 | ;; | |
1055 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
1056 | cpu=i686 | |
1057 | ;; | |
1058 | pentium4-*) | |
1059 | cpu=i786 | |
1060 | ;; | |
1061 | pc98-*) | |
1062 | cpu=i386 | |
1063 | ;; | |
1064 | ppc-* | ppcbe-*) | |
1065 | cpu=powerpc | |
1066 | ;; | |
1067 | ppcle-* | powerpclittle-*) | |
1068 | cpu=powerpcle | |
1069 | ;; | |
1070 | ppc64-*) | |
1071 | cpu=powerpc64 | |
1072 | ;; | |
1073 | ppc64le-* | powerpc64little-*) | |
1074 | cpu=powerpc64le | |
1075 | ;; | |
1076 | sb1-*) | |
1077 | cpu=mipsisa64sb1 | |
1078 | ;; | |
1079 | sb1el-*) | |
1080 | cpu=mipsisa64sb1el | |
1081 | ;; | |
1082 | sh5e[lb]-*) | |
1083 | cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` | |
1084 | ;; | |
1085 | spur-*) | |
1086 | cpu=spur | |
1087 | ;; | |
1088 | strongarm-* | thumb-*) | |
1089 | cpu=arm | |
1090 | ;; | |
1091 | tx39-*) | |
1092 | cpu=mipstx39 | |
1093 | ;; | |
1094 | tx39el-*) | |
1095 | cpu=mipstx39el | |
1096 | ;; | |
1097 | x64-*) | |
1098 | cpu=x86_64 | |
1099 | ;; | |
1100 | xscale-* | xscalee[bl]-*) | |
1101 | cpu=`echo "$cpu" | sed 's/^xscale/arm/'` | |
1102 | ;; | |
1103 | ||
1104 | # Recognize the canonical CPU Types that limit and/or modify the | |
1105 | # company names they are paired with. | |
1106 | cr16-*) | |
1107 | os=${os:-elf} | |
1108 | ;; | |
1109 | crisv32-* | etraxfs*-*) | |
1110 | cpu=crisv32 | |
1111 | vendor=axis | |
1112 | ;; | |
1113 | cris-* | etrax*-*) | |
1114 | cpu=cris | |
1115 | vendor=axis | |
1116 | ;; | |
1117 | crx-*) | |
1118 | os=${os:-elf} | |
1119 | ;; | |
1120 | neo-tandem) | |
1121 | cpu=neo | |
1122 | vendor=tandem | |
1123 | ;; | |
1124 | nse-tandem) | |
1125 | cpu=nse | |
1126 | vendor=tandem | |
1127 | ;; | |
1128 | nsr-tandem) | |
1129 | cpu=nsr | |
1130 | vendor=tandem | |
1131 | ;; | |
1132 | nsv-tandem) | |
1133 | cpu=nsv | |
1134 | vendor=tandem | |
1135 | ;; | |
1136 | nsx-tandem) | |
1137 | cpu=nsx | |
1138 | vendor=tandem | |
1139 | ;; | |
1140 | s390-*) | |
1141 | cpu=s390 | |
1142 | vendor=ibm | |
1143 | ;; | |
1144 | s390x-*) | |
1145 | cpu=s390x | |
1146 | vendor=ibm | |
1147 | ;; | |
1148 | tile*-*) | |
1149 | os=${os:-linux-gnu} | |
1150 | ;; | |
1151 | ||
1152 | *) | |
1153 | # Recognize the canonical CPU types that are allowed with any | |
1154 | # company name. | |
1155 | case $cpu in | |
1156 | 1750a | 580 \ | |
1157 | | a29k \ | |
1158 | | aarch64 | aarch64_be \ | |
1159 | | abacus \ | |
1160 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | |
1161 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | |
1162 | | alphapca5[67] | alpha64pca5[67] \ | |
1163 | | am33_2.0 \ | |
1164 | | amdgcn \ | |
1165 | | arc | arceb \ | |
1166 | | arm | arm[lb]e | arme[lb] | armv* \ | |
1167 | | avr | avr32 \ | |
1168 | | asmjs \ | |
1169 | | ba \ | |
1170 | | be32 | be64 \ | |
1171 | | bfin | bpf | bs2000 \ | |
1172 | | c[123]* | c30 | [cjt]90 | c4x \ | |
1173 | | c8051 | clipper | craynv | csky | cydra \ | |
1174 | | d10v | d30v | dlx | dsp16xx \ | |
1175 | | e2k | elxsi | epiphany \ | |
1176 | | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | |
1177 | | h8300 | h8500 \ | |
1178 | | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
1179 | | hexagon \ | |
1180 | | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | |
1181 | | ip2k | iq2000 \ | |
1182 | | k1om \ | |
1183 | | le32 | le64 \ | |
1184 | | lm32 \ | |
1185 | | m32c | m32r | m32rle \ | |
1186 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | |
1187 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | |
1188 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ | |
1189 | | microblaze | microblazeel \ | |
1190 | | mips | mipsbe | mipseb | mipsel | mipsle \ | |
1191 | | mips16 \ | |
1192 | | mips64 | mips64eb | mips64el \ | |
1193 | | mips64octeon | mips64octeonel \ | |
1194 | | mips64orion | mips64orionel \ | |
1195 | | mips64r5900 | mips64r5900el \ | |
1196 | | mips64vr | mips64vrel \ | |
1197 | | mips64vr4100 | mips64vr4100el \ | |
1198 | | mips64vr4300 | mips64vr4300el \ | |
1199 | | mips64vr5000 | mips64vr5000el \ | |
1200 | | mips64vr5900 | mips64vr5900el \ | |
1201 | | mipsisa32 | mipsisa32el \ | |
1202 | | mipsisa32r2 | mipsisa32r2el \ | |
1203 | | mipsisa32r6 | mipsisa32r6el \ | |
1204 | | mipsisa64 | mipsisa64el \ | |
1205 | | mipsisa64r2 | mipsisa64r2el \ | |
1206 | | mipsisa64r6 | mipsisa64r6el \ | |
1207 | | mipsisa64sb1 | mipsisa64sb1el \ | |
1208 | | mipsisa64sr71k | mipsisa64sr71kel \ | |
1209 | | mipsr5900 | mipsr5900el \ | |
1210 | | mipstx39 | mipstx39el \ | |
1211 | | mmix \ | |
1212 | | mn10200 | mn10300 \ | |
1213 | | moxie \ | |
1214 | | mt \ | |
1215 | | msp430 \ | |
1216 | | nds32 | nds32le | nds32be \ | |
1217 | | nfp \ | |
1218 | | nios | nios2 | nios2eb | nios2el \ | |
1219 | | none | np1 | ns16k | ns32k | nvptx \ | |
1220 | | open8 \ | |
1221 | | or1k* \ | |
1222 | | or32 \ | |
1223 | | orion \ | |
1224 | | picochip \ | |
1225 | | pdp10 | pdp11 | pj | pjl | pn | power \ | |
1226 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | |
1227 | | pru \ | |
1228 | | pyramid \ | |
1229 | | riscv | riscv32 | riscv64 \ | |
1230 | | rl78 | romp | rs6000 | rx \ | |
1231 | | score \ | |
1232 | | sh | shl \ | |
1233 | | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | |
1234 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | |
1235 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | |
1236 | | sparclite \ | |
1237 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
1238 | | spu \ | |
1239 | | tahoe \ | |
1240 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
1241 | | tron \ | |
1242 | | ubicom32 \ | |
1243 | | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | |
1244 | | vax \ | |
1245 | | visium \ | |
1246 | | w65 \ | |
1247 | | wasm32 | wasm64 \ | |
1248 | | we32k \ | |
1249 | | x86 | x86_64 | xc16x | xgate | xps100 \ | |
1250 | | xstormy16 | xtensa* \ | |
1251 | | ymp \ | |
1252 | | z8k | z80) | |
1253 | ;; | |
1254 | ||
1255 | *) | |
1256 | echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 | |
1257 | exit 1 | |
1258 | ;; | |
1259 | esac | |
1260 | ;; | |
1261 | esac | |
1262 | ||
1263 | # Here we canonicalize certain aliases for manufacturers. | |
1264 | case $vendor in | |
1265 | digital*) | |
1266 | vendor=dec | |
1267 | ;; | |
1268 | commodore*) | |
1269 | vendor=cbm | |
1270 | ;; | |
1271 | *) | |
1272 | ;; | |
1273 | esac | |
1274 | ||
1275 | # Decode manufacturer-specific aliases for certain operating systems. | |
1276 | ||
1277 | if [ x$os != x ] | |
1278 | then | |
1279 | case $os in | |
1280 | # First match some system type aliases that might get confused | |
1281 | # with valid system types. | |
1282 | # solaris* is a basic system type, with this one exception. | |
1283 | auroraux) | |
1284 | os=auroraux | |
1285 | ;; | |
1286 | bluegene*) | |
1287 | os=cnk | |
1288 | ;; | |
1289 | solaris1 | solaris1.*) | |
1290 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1291 | ;; | |
1292 | solaris) | |
1293 | os=solaris2 | |
1294 | ;; | |
1295 | unixware*) | |
1296 | os=sysv4.2uw | |
1297 | ;; | |
1298 | gnu/linux*) | |
1299 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1300 | ;; | |
1301 | # es1800 is here to avoid being matched by es* (a different OS) | |
1302 | es1800*) | |
1303 | os=ose | |
1304 | ;; | |
1305 | # Some version numbers need modification | |
1306 | chorusos*) | |
1307 | os=chorusos | |
1308 | ;; | |
1309 | isc) | |
1310 | os=isc2.2 | |
1311 | ;; | |
1312 | sco6) | |
1313 | os=sco5v6 | |
1314 | ;; | |
1315 | sco5) | |
1316 | os=sco3.2v5 | |
1317 | ;; | |
1318 | sco4) | |
1319 | os=sco3.2v4 | |
1320 | ;; | |
1321 | sco3.2.[4-9]*) | |
1322 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
1323 | ;; | |
1324 | sco3.2v[4-9]* | sco5v6*) | |
1325 | # Don't forget version if it is 3.2v4 or newer. | |
1326 | ;; | |
1327 | scout) | |
1328 | # Don't match below | |
1329 | ;; | |
1330 | sco*) | |
1331 | os=sco3.2v2 | |
1332 | ;; | |
1333 | psos*) | |
1334 | os=psos | |
1335 | ;; | |
1336 | # Now accept the basic system types. | |
1337 | # The portable systems comes first. | |
1338 | # Each alternative MUST end in a * to match a version number. | |
1339 | # sysv* is not here because it comes later, after sysvr4. | |
1340 | gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | |
1341 | | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ | |
1342 | | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | |
1343 | | sym* | kopensolaris* | plan9* \ | |
1344 | | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | |
1345 | | aos* | aros* | cloudabi* | sortix* | twizzler* \ | |
1346 | | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | |
1347 | | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | |
1348 | | knetbsd* | mirbsd* | netbsd* \ | |
1349 | | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ | |
1350 | | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | |
1351 | | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | |
1352 | | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | |
1353 | | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ | |
1354 | | chorusrdb* | cegcc* | glidix* \ | |
1355 | | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | |
1356 | | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ | |
1357 | | linux-newlib* | linux-musl* | linux-uclibc* \ | |
1358 | | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | |
1359 | | interix* | uwin* | mks* | rhapsody* | darwin* \ | |
1360 | | openstep* | oskit* | conix* | pw32* | nonstopux* \ | |
1361 | | storm-chaos* | tops10* | tenex* | tops20* | its* \ | |
1362 | | os2* | vos* | palmos* | uclinux* | nucleus* \ | |
1363 | | morphos* | superux* | rtmk* | windiss* \ | |
1364 | | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | |
1365 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | |
1366 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | |
1367 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | |
1368 | | nsk* | powerunix) | |
1369 | # Remember, each alternative MUST END IN *, to match a version number. | |
1370 | ;; | |
1371 | qnx*) | |
1372 | case $cpu in | |
1373 | x86 | i*86) | |
1374 | ;; | |
1375 | *) | |
1376 | os=nto-$os | |
1377 | ;; | |
1378 | esac | |
1379 | ;; | |
1380 | hiux*) | |
1381 | os=hiuxwe2 | |
1382 | ;; | |
1383 | nto-qnx*) | |
1384 | ;; | |
1385 | nto*) | |
1386 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
1387 | ;; | |
1388 | sim | xray | os68k* | v88r* \ | |
1389 | | windows* | osx | abug | netware* | os9* \ | |
1390 | | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) | |
1391 | ;; | |
1392 | linux-dietlibc) | |
1393 | os=linux-dietlibc | |
1394 | ;; | |
1395 | linux*) | |
1396 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1397 | ;; | |
1398 | lynx*178) | |
1399 | os=lynxos178 | |
1400 | ;; | |
1401 | lynx*5) | |
1402 | os=lynxos5 | |
1403 | ;; | |
1404 | lynx*) | |
1405 | os=lynxos | |
1406 | ;; | |
1407 | mac*) | |
1408 | os=`echo "$os" | sed -e 's|mac|macos|'` | |
1409 | ;; | |
1410 | opened*) | |
1411 | os=openedition | |
1412 | ;; | |
1413 | os400*) | |
1414 | os=os400 | |
1415 | ;; | |
1416 | sunos5*) | |
1417 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` | |
1418 | ;; | |
1419 | sunos6*) | |
1420 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` | |
1421 | ;; | |
1422 | wince*) | |
1423 | os=wince | |
1424 | ;; | |
1425 | utek*) | |
1426 | os=bsd | |
1427 | ;; | |
1428 | dynix*) | |
1429 | os=bsd | |
1430 | ;; | |
1431 | acis*) | |
1432 | os=aos | |
1433 | ;; | |
1434 | atheos*) | |
1435 | os=atheos | |
1436 | ;; | |
1437 | syllable*) | |
1438 | os=syllable | |
1439 | ;; | |
1440 | 386bsd) | |
1441 | os=bsd | |
1442 | ;; | |
1443 | ctix* | uts*) | |
1444 | os=sysv | |
1445 | ;; | |
1446 | nova*) | |
1447 | os=rtmk-nova | |
1448 | ;; | |
1449 | ns2) | |
1450 | os=nextstep2 | |
1451 | ;; | |
1452 | # Preserve the version number of sinix5. | |
1453 | sinix5.*) | |
1454 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
1455 | ;; | |
1456 | sinix*) | |
1457 | os=sysv4 | |
1458 | ;; | |
1459 | tpf*) | |
1460 | os=tpf | |
1461 | ;; | |
1462 | triton*) | |
1463 | os=sysv3 | |
1464 | ;; | |
1465 | oss*) | |
1466 | os=sysv3 | |
1467 | ;; | |
1468 | svr4*) | |
1469 | os=sysv4 | |
1470 | ;; | |
1471 | svr3) | |
1472 | os=sysv3 | |
1473 | ;; | |
1474 | sysvr4) | |
1475 | os=sysv4 | |
1476 | ;; | |
1477 | # This must come after sysvr4. | |
1478 | sysv*) | |
1479 | ;; | |
1480 | ose*) | |
1481 | os=ose | |
1482 | ;; | |
1483 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
1484 | os=mint | |
1485 | ;; | |
1486 | zvmoe) | |
1487 | os=zvmoe | |
1488 | ;; | |
1489 | dicos*) | |
1490 | os=dicos | |
1491 | ;; | |
1492 | pikeos*) | |
1493 | # Until real need of OS specific support for | |
1494 | # particular features comes up, bare metal | |
1495 | # configurations are quite functional. | |
1496 | case $cpu in | |
1497 | arm*) | |
1498 | os=eabi | |
1499 | ;; | |
1500 | *) | |
1501 | os=elf | |
1502 | ;; | |
1503 | esac | |
1504 | ;; | |
1505 | nacl*) | |
1506 | ;; | |
1507 | ios) | |
1508 | ;; | |
1509 | none) | |
1510 | ;; | |
1511 | *-eabi) | |
1512 | ;; | |
1513 | *) | |
1514 | echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 | |
1515 | exit 1 | |
1516 | ;; | |
1517 | esac | |
1518 | else | |
1519 | ||
1520 | # Here we handle the default operating systems that come with various machines. | |
1521 | # The value should be what the vendor currently ships out the door with their | |
1522 | # machine or put another way, the most popular os provided with the machine. | |
1523 | ||
1524 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | |
1525 | # "-sun"), then you have to tell the case statement up towards the top | |
1526 | # that MANUFACTURER isn't an operating system. Otherwise, code above | |
1527 | # will signal an error saying that MANUFACTURER isn't an operating | |
1528 | # system, and we'll never get to this point. | |
1529 | ||
1530 | case $cpu-$vendor in | |
1531 | score-*) | |
1532 | os=elf | |
1533 | ;; | |
1534 | spu-*) | |
1535 | os=elf | |
1536 | ;; | |
1537 | *-acorn) | |
1538 | os=riscix1.2 | |
1539 | ;; | |
1540 | arm*-rebel) | |
1541 | os=linux | |
1542 | ;; | |
1543 | arm*-semi) | |
1544 | os=aout | |
1545 | ;; | |
1546 | c4x-* | tic4x-*) | |
1547 | os=coff | |
1548 | ;; | |
1549 | c8051-*) | |
1550 | os=elf | |
1551 | ;; | |
1552 | clipper-intergraph) | |
1553 | os=clix | |
1554 | ;; | |
1555 | hexagon-*) | |
1556 | os=elf | |
1557 | ;; | |
1558 | tic54x-*) | |
1559 | os=coff | |
1560 | ;; | |
1561 | tic55x-*) | |
1562 | os=coff | |
1563 | ;; | |
1564 | tic6x-*) | |
1565 | os=coff | |
1566 | ;; | |
1567 | # This must come before the *-dec entry. | |
1568 | pdp10-*) | |
1569 | os=tops20 | |
1570 | ;; | |
1571 | pdp11-*) | |
1572 | os=none | |
1573 | ;; | |
1574 | *-dec | vax-*) | |
1575 | os=ultrix4.2 | |
1576 | ;; | |
1577 | m68*-apollo) | |
1578 | os=domain | |
1579 | ;; | |
1580 | i386-sun) | |
1581 | os=sunos4.0.2 | |
1582 | ;; | |
1583 | m68000-sun) | |
1584 | os=sunos3 | |
1585 | ;; | |
1586 | m68*-cisco) | |
1587 | os=aout | |
1588 | ;; | |
1589 | mep-*) | |
1590 | os=elf | |
1591 | ;; | |
1592 | mips*-cisco) | |
1593 | os=elf | |
1594 | ;; | |
1595 | mips*-*) | |
1596 | os=elf | |
1597 | ;; | |
1598 | or32-*) | |
1599 | os=coff | |
1600 | ;; | |
1601 | *-tti) # must be before sparc entry or we get the wrong os. | |
1602 | os=sysv3 | |
1603 | ;; | |
1604 | sparc-* | *-sun) | |
1605 | os=sunos4.1.1 | |
1606 | ;; | |
1607 | pru-*) | |
1608 | os=elf | |
1609 | ;; | |
1610 | *-be) | |
1611 | os=beos | |
1612 | ;; | |
1613 | *-ibm) | |
1614 | os=aix | |
1615 | ;; | |
1616 | *-knuth) | |
1617 | os=mmixware | |
1618 | ;; | |
1619 | *-wec) | |
1620 | os=proelf | |
1621 | ;; | |
1622 | *-winbond) | |
1623 | os=proelf | |
1624 | ;; | |
1625 | *-oki) | |
1626 | os=proelf | |
1627 | ;; | |
1628 | *-hp) | |
1629 | os=hpux | |
1630 | ;; | |
1631 | *-hitachi) | |
1632 | os=hiux | |
1633 | ;; | |
1634 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
1635 | os=sysv | |
1636 | ;; | |
1637 | *-cbm) | |
1638 | os=amigaos | |
1639 | ;; | |
1640 | *-dg) | |
1641 | os=dgux | |
1642 | ;; | |
1643 | *-dolphin) | |
1644 | os=sysv3 | |
1645 | ;; | |
1646 | m68k-ccur) | |
1647 | os=rtu | |
1648 | ;; | |
1649 | m88k-omron*) | |
1650 | os=luna | |
1651 | ;; | |
1652 | *-next) | |
1653 | os=nextstep | |
1654 | ;; | |
1655 | *-sequent) | |
1656 | os=ptx | |
1657 | ;; | |
1658 | *-crds) | |
1659 | os=unos | |
1660 | ;; | |
1661 | *-ns) | |
1662 | os=genix | |
1663 | ;; | |
1664 | i370-*) | |
1665 | os=mvs | |
1666 | ;; | |
1667 | *-gould) | |
1668 | os=sysv | |
1669 | ;; | |
1670 | *-highlevel) | |
1671 | os=bsd | |
1672 | ;; | |
1673 | *-encore) | |
1674 | os=bsd | |
1675 | ;; | |
1676 | *-sgi) | |
1677 | os=irix | |
1678 | ;; | |
1679 | *-siemens) | |
1680 | os=sysv4 | |
1681 | ;; | |
1682 | *-masscomp) | |
1683 | os=rtu | |
1684 | ;; | |
1685 | f30[01]-fujitsu | f700-fujitsu) | |
1686 | os=uxpv | |
1687 | ;; | |
1688 | *-rom68k) | |
1689 | os=coff | |
1690 | ;; | |
1691 | *-*bug) | |
1692 | os=coff | |
1693 | ;; | |
1694 | *-apple) | |
1695 | os=macos | |
1696 | ;; | |
1697 | *-atari*) | |
1698 | os=mint | |
1699 | ;; | |
1700 | *-wrs) | |
1701 | os=vxworks | |
1702 | ;; | |
1703 | *) | |
1704 | os=none | |
1705 | ;; | |
1706 | esac | |
1707 | fi | |
1708 | ||
1709 | # Here we handle the case where we know the os, and the CPU type, but not the | |
1710 | # manufacturer. We pick the logical manufacturer. | |
1711 | case $vendor in | |
1712 | unknown) | |
1713 | case $os in | |
1714 | riscix*) | |
1715 | vendor=acorn | |
1716 | ;; | |
1717 | sunos*) | |
1718 | vendor=sun | |
1719 | ;; | |
1720 | cnk*|-aix*) | |
1721 | vendor=ibm | |
1722 | ;; | |
1723 | beos*) | |
1724 | vendor=be | |
1725 | ;; | |
1726 | hpux*) | |
1727 | vendor=hp | |
1728 | ;; | |
1729 | mpeix*) | |
1730 | vendor=hp | |
1731 | ;; | |
1732 | hiux*) | |
1733 | vendor=hitachi | |
1734 | ;; | |
1735 | unos*) | |
1736 | vendor=crds | |
1737 | ;; | |
1738 | dgux*) | |
1739 | vendor=dg | |
1740 | ;; | |
1741 | luna*) | |
1742 | vendor=omron | |
1743 | ;; | |
1744 | genix*) | |
1745 | vendor=ns | |
1746 | ;; | |
1747 | clix*) | |
1748 | vendor=intergraph | |
1749 | ;; | |
1750 | mvs* | opened*) | |
1751 | vendor=ibm | |
1752 | ;; | |
1753 | os400*) | |
1754 | vendor=ibm | |
1755 | ;; | |
1756 | ptx*) | |
1757 | vendor=sequent | |
1758 | ;; | |
1759 | tpf*) | |
1760 | vendor=ibm | |
1761 | ;; | |
1762 | vxsim* | vxworks* | windiss*) | |
1763 | vendor=wrs | |
1764 | ;; | |
1765 | aux*) | |
1766 | vendor=apple | |
1767 | ;; | |
1768 | hms*) | |
1769 | vendor=hitachi | |
1770 | ;; | |
1771 | mpw* | macos*) | |
1772 | vendor=apple | |
1773 | ;; | |
1774 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
1775 | vendor=atari | |
1776 | ;; | |
1777 | vos*) | |
1778 | vendor=stratus | |
1779 | ;; | |
1780 | esac | |
1781 | ;; | |
1782 | esac | |
1783 | ||
1784 | echo "$cpu-$vendor-$os" | |
1785 | exit | |
1786 | ||
1787 | # Local variables: | |
1788 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
1789 | # time-stamp-start: "timestamp='" | |
1790 | # time-stamp-format: "%:y-%02m-%02d" | |
1791 | # time-stamp-end: "'" | |
1792 | # End: |
0 | #! /bin/sh | |
1 | # Guess values for system-dependent variables and create Makefiles. | |
2 | # Generated by GNU Autoconf 2.69 for i3lock 2.13. | |
3 | # | |
4 | # Report bugs to <https://github.com/i3/i3lock/issues>. | |
5 | # | |
6 | # | |
7 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
8 | # | |
9 | # | |
10 | # This configure script is free software; the Free Software Foundation | |
11 | # gives unlimited permission to copy, distribute and modify it. | |
12 | ## -------------------- ## | |
13 | ## M4sh Initialization. ## | |
14 | ## -------------------- ## | |
15 | ||
16 | # Be more Bourne compatible | |
17 | DUALCASE=1; export DUALCASE # for MKS sh | |
18 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
19 | emulate sh | |
20 | NULLCMD=: | |
21 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
22 | # is contrary to our usage. Disable this feature. | |
23 | alias -g '${1+"$@"}'='"$@"' | |
24 | setopt NO_GLOB_SUBST | |
25 | else | |
26 | case `(set -o) 2>/dev/null` in #( | |
27 | *posix*) : | |
28 | set -o posix ;; #( | |
29 | *) : | |
30 | ;; | |
31 | esac | |
32 | fi | |
33 | ||
34 | ||
35 | as_nl=' | |
36 | ' | |
37 | export as_nl | |
38 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
39 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
42 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
43 | # but without wasting forks for bash or zsh. | |
44 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
45 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
46 | as_echo='print -r --' | |
47 | as_echo_n='print -rn --' | |
48 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
49 | as_echo='printf %s\n' | |
50 | as_echo_n='printf %s' | |
51 | else | |
52 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
53 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
54 | as_echo_n='/usr/ucb/echo -n' | |
55 | else | |
56 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
57 | as_echo_n_body='eval | |
58 | arg=$1; | |
59 | case $arg in #( | |
60 | *"$as_nl"*) | |
61 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
62 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
63 | esac; | |
64 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
65 | ' | |
66 | export as_echo_n_body | |
67 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
68 | fi | |
69 | export as_echo_body | |
70 | as_echo='sh -c $as_echo_body as_echo' | |
71 | fi | |
72 | ||
73 | # The user is always right. | |
74 | if test "${PATH_SEPARATOR+set}" != set; then | |
75 | PATH_SEPARATOR=: | |
76 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
77 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
78 | PATH_SEPARATOR=';' | |
79 | } | |
80 | fi | |
81 | ||
82 | ||
83 | # IFS | |
84 | # We need space, tab and new line, in precisely that order. Quoting is | |
85 | # there to prevent editors from complaining about space-tab. | |
86 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
87 | # splitting by setting IFS to empty value.) | |
88 | IFS=" "" $as_nl" | |
89 | ||
90 | # Find who we are. Look in the path if we contain no directory separator. | |
91 | as_myself= | |
92 | case $0 in #(( | |
93 | *[\\/]* ) as_myself=$0 ;; | |
94 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
95 | for as_dir in $PATH | |
96 | do | |
97 | IFS=$as_save_IFS | |
98 | test -z "$as_dir" && as_dir=. | |
99 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
100 | done | |
101 | IFS=$as_save_IFS | |
102 | ||
103 | ;; | |
104 | esac | |
105 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
106 | # in which case we are not to be found in the path. | |
107 | if test "x$as_myself" = x; then | |
108 | as_myself=$0 | |
109 | fi | |
110 | if test ! -f "$as_myself"; then | |
111 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
112 | exit 1 | |
113 | fi | |
114 | ||
115 | # Unset variables that we do not need and which cause bugs (e.g. in | |
116 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
117 | # suppresses any "Segmentation fault" message there. '((' could | |
118 | # trigger a bug in pdksh 5.2.14. | |
119 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
120 | do eval test x\${$as_var+set} = xset \ | |
121 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
122 | done | |
123 | PS1='$ ' | |
124 | PS2='> ' | |
125 | PS4='+ ' | |
126 | ||
127 | # NLS nuisances. | |
128 | LC_ALL=C | |
129 | export LC_ALL | |
130 | LANGUAGE=C | |
131 | export LANGUAGE | |
132 | ||
133 | # CDPATH. | |
134 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
135 | ||
136 | # Use a proper internal environment variable to ensure we don't fall | |
137 | # into an infinite loop, continuously re-executing ourselves. | |
138 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
139 | _as_can_reexec=no; export _as_can_reexec; | |
140 | # We cannot yet assume a decent shell, so we have to provide a | |
141 | # neutralization value for shells without unset; and this also | |
142 | # works around shells that cannot unset nonexistent variables. | |
143 | # Preserve -v and -x to the replacement shell. | |
144 | BASH_ENV=/dev/null | |
145 | ENV=/dev/null | |
146 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
147 | case $- in # (((( | |
148 | *v*x* | *x*v* ) as_opts=-vx ;; | |
149 | *v* ) as_opts=-v ;; | |
150 | *x* ) as_opts=-x ;; | |
151 | * ) as_opts= ;; | |
152 | esac | |
153 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
154 | # Admittedly, this is quite paranoid, since all the known shells bail | |
155 | # out after a failed `exec'. | |
156 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
157 | as_fn_exit 255 | |
158 | fi | |
159 | # We don't want this to propagate to other subprocesses. | |
160 | { _as_can_reexec=; unset _as_can_reexec;} | |
161 | if test "x$CONFIG_SHELL" = x; then | |
162 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
163 | emulate sh | |
164 | NULLCMD=: | |
165 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
166 | # is contrary to our usage. Disable this feature. | |
167 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
168 | setopt NO_GLOB_SUBST | |
169 | else | |
170 | case \`(set -o) 2>/dev/null\` in #( | |
171 | *posix*) : | |
172 | set -o posix ;; #( | |
173 | *) : | |
174 | ;; | |
175 | esac | |
176 | fi | |
177 | " | |
178 | as_required="as_fn_return () { (exit \$1); } | |
179 | as_fn_success () { as_fn_return 0; } | |
180 | as_fn_failure () { as_fn_return 1; } | |
181 | as_fn_ret_success () { return 0; } | |
182 | as_fn_ret_failure () { return 1; } | |
183 | ||
184 | exitcode=0 | |
185 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
186 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
187 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
188 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
189 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
190 | ||
191 | else | |
192 | exitcode=1; echo positional parameters were not saved. | |
193 | fi | |
194 | test x\$exitcode = x0 || exit 1 | |
195 | test -x / || exit 1" | |
196 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
197 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
198 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
199 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
200 | test \$(( 1 + 1 )) = 2 || exit 1" | |
201 | if (eval "$as_required") 2>/dev/null; then : | |
202 | as_have_required=yes | |
203 | else | |
204 | as_have_required=no | |
205 | fi | |
206 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
207 | ||
208 | else | |
209 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
210 | as_found=false | |
211 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
212 | do | |
213 | IFS=$as_save_IFS | |
214 | test -z "$as_dir" && as_dir=. | |
215 | as_found=: | |
216 | case $as_dir in #( | |
217 | /*) | |
218 | for as_base in sh bash ksh sh5; do | |
219 | # Try only shells that exist, to save several forks. | |
220 | as_shell=$as_dir/$as_base | |
221 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
222 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
223 | CONFIG_SHELL=$as_shell as_have_required=yes | |
224 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
225 | break 2 | |
226 | fi | |
227 | fi | |
228 | done;; | |
229 | esac | |
230 | as_found=false | |
231 | done | |
232 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
233 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
234 | CONFIG_SHELL=$SHELL as_have_required=yes | |
235 | fi; } | |
236 | IFS=$as_save_IFS | |
237 | ||
238 | ||
239 | if test "x$CONFIG_SHELL" != x; then : | |
240 | export CONFIG_SHELL | |
241 | # We cannot yet assume a decent shell, so we have to provide a | |
242 | # neutralization value for shells without unset; and this also | |
243 | # works around shells that cannot unset nonexistent variables. | |
244 | # Preserve -v and -x to the replacement shell. | |
245 | BASH_ENV=/dev/null | |
246 | ENV=/dev/null | |
247 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
248 | case $- in # (((( | |
249 | *v*x* | *x*v* ) as_opts=-vx ;; | |
250 | *v* ) as_opts=-v ;; | |
251 | *x* ) as_opts=-x ;; | |
252 | * ) as_opts= ;; | |
253 | esac | |
254 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
255 | # Admittedly, this is quite paranoid, since all the known shells bail | |
256 | # out after a failed `exec'. | |
257 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
258 | exit 255 | |
259 | fi | |
260 | ||
261 | if test x$as_have_required = xno; then : | |
262 | $as_echo "$0: This script requires a shell more modern than all" | |
263 | $as_echo "$0: the shells that I found on your system." | |
264 | if test x${ZSH_VERSION+set} = xset ; then | |
265 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
266 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
267 | else | |
268 | $as_echo "$0: Please tell bug-autoconf@gnu.org and | |
269 | $0: https://github.com/i3/i3lock/issues about your system, | |
270 | $0: including any error possibly output before this | |
271 | $0: message. Then install a modern shell, or manually run | |
272 | $0: the script under such a shell if you do have one." | |
273 | fi | |
274 | exit 1 | |
275 | fi | |
276 | fi | |
277 | fi | |
278 | SHELL=${CONFIG_SHELL-/bin/sh} | |
279 | export SHELL | |
280 | # Unset more variables known to interfere with behavior of common tools. | |
281 | CLICOLOR_FORCE= GREP_OPTIONS= | |
282 | unset CLICOLOR_FORCE GREP_OPTIONS | |
283 | ||
284 | ## --------------------- ## | |
285 | ## M4sh Shell Functions. ## | |
286 | ## --------------------- ## | |
287 | # as_fn_unset VAR | |
288 | # --------------- | |
289 | # Portably unset VAR. | |
290 | as_fn_unset () | |
291 | { | |
292 | { eval $1=; unset $1;} | |
293 | } | |
294 | as_unset=as_fn_unset | |
295 | ||
296 | # as_fn_set_status STATUS | |
297 | # ----------------------- | |
298 | # Set $? to STATUS, without forking. | |
299 | as_fn_set_status () | |
300 | { | |
301 | return $1 | |
302 | } # as_fn_set_status | |
303 | ||
304 | # as_fn_exit STATUS | |
305 | # ----------------- | |
306 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
307 | as_fn_exit () | |
308 | { | |
309 | set +e | |
310 | as_fn_set_status $1 | |
311 | exit $1 | |
312 | } # as_fn_exit | |
313 | ||
314 | # as_fn_mkdir_p | |
315 | # ------------- | |
316 | # Create "$as_dir" as a directory, including parents if necessary. | |
317 | as_fn_mkdir_p () | |
318 | { | |
319 | ||
320 | case $as_dir in #( | |
321 | -*) as_dir=./$as_dir;; | |
322 | esac | |
323 | test -d "$as_dir" || eval $as_mkdir_p || { | |
324 | as_dirs= | |
325 | while :; do | |
326 | case $as_dir in #( | |
327 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
328 | *) as_qdir=$as_dir;; | |
329 | esac | |
330 | as_dirs="'$as_qdir' $as_dirs" | |
331 | as_dir=`$as_dirname -- "$as_dir" || | |
332 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
333 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
334 | X"$as_dir" : 'X\(//\)$' \| \ | |
335 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
336 | $as_echo X"$as_dir" | | |
337 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
338 | s//\1/ | |
339 | q | |
340 | } | |
341 | /^X\(\/\/\)[^/].*/{ | |
342 | s//\1/ | |
343 | q | |
344 | } | |
345 | /^X\(\/\/\)$/{ | |
346 | s//\1/ | |
347 | q | |
348 | } | |
349 | /^X\(\/\).*/{ | |
350 | s//\1/ | |
351 | q | |
352 | } | |
353 | s/.*/./; q'` | |
354 | test -d "$as_dir" && break | |
355 | done | |
356 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
357 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
358 | ||
359 | ||
360 | } # as_fn_mkdir_p | |
361 | ||
362 | # as_fn_executable_p FILE | |
363 | # ----------------------- | |
364 | # Test if FILE is an executable regular file. | |
365 | as_fn_executable_p () | |
366 | { | |
367 | test -f "$1" && test -x "$1" | |
368 | } # as_fn_executable_p | |
369 | # as_fn_append VAR VALUE | |
370 | # ---------------------- | |
371 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
372 | # advantage of any shell optimizations that allow amortized linear growth over | |
373 | # repeated appends, instead of the typical quadratic growth present in naive | |
374 | # implementations. | |
375 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
376 | eval 'as_fn_append () | |
377 | { | |
378 | eval $1+=\$2 | |
379 | }' | |
380 | else | |
381 | as_fn_append () | |
382 | { | |
383 | eval $1=\$$1\$2 | |
384 | } | |
385 | fi # as_fn_append | |
386 | ||
387 | # as_fn_arith ARG... | |
388 | # ------------------ | |
389 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
390 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
391 | # must be portable across $(()) and expr. | |
392 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
393 | eval 'as_fn_arith () | |
394 | { | |
395 | as_val=$(( $* )) | |
396 | }' | |
397 | else | |
398 | as_fn_arith () | |
399 | { | |
400 | as_val=`expr "$@" || test $? -eq 1` | |
401 | } | |
402 | fi # as_fn_arith | |
403 | ||
404 | ||
405 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
406 | # ---------------------------------------- | |
407 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
408 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
409 | # script with STATUS, using 1 if that was 0. | |
410 | as_fn_error () | |
411 | { | |
412 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
413 | if test "$4"; then | |
414 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
415 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
416 | fi | |
417 | $as_echo "$as_me: error: $2" >&2 | |
418 | as_fn_exit $as_status | |
419 | } # as_fn_error | |
420 | ||
421 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
422 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
423 | as_expr=expr | |
424 | else | |
425 | as_expr=false | |
426 | fi | |
427 | ||
428 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
429 | as_basename=basename | |
430 | else | |
431 | as_basename=false | |
432 | fi | |
433 | ||
434 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
435 | as_dirname=dirname | |
436 | else | |
437 | as_dirname=false | |
438 | fi | |
439 | ||
440 | as_me=`$as_basename -- "$0" || | |
441 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
442 | X"$0" : 'X\(//\)$' \| \ | |
443 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
444 | $as_echo X/"$0" | | |
445 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
446 | s//\1/ | |
447 | q | |
448 | } | |
449 | /^X\/\(\/\/\)$/{ | |
450 | s//\1/ | |
451 | q | |
452 | } | |
453 | /^X\/\(\/\).*/{ | |
454 | s//\1/ | |
455 | q | |
456 | } | |
457 | s/.*/./; q'` | |
458 | ||
459 | # Avoid depending upon Character Ranges. | |
460 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
461 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
462 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
463 | as_cr_digits='0123456789' | |
464 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
465 | ||
466 | ||
467 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
468 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
469 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
470 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
471 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
472 | sed -n ' | |
473 | p | |
474 | /[$]LINENO/= | |
475 | ' <$as_myself | | |
476 | sed ' | |
477 | s/[$]LINENO.*/&-/ | |
478 | t lineno | |
479 | b | |
480 | :lineno | |
481 | N | |
482 | :loop | |
483 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
484 | t loop | |
485 | s/-\n.*// | |
486 | ' >$as_me.lineno && | |
487 | chmod +x "$as_me.lineno" || | |
488 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
489 | ||
490 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have | |
491 | # already done that, so ensure we don't try to do so again and fall | |
492 | # in an infinite loop. This has already happened in practice. | |
493 | _as_can_reexec=no; export _as_can_reexec | |
494 | # Don't try to exec as it changes $[0], causing all sort of problems | |
495 | # (the dirname of $[0] is not the place where we might find the | |
496 | # original and so on. Autoconf is especially sensitive to this). | |
497 | . "./$as_me.lineno" | |
498 | # Exit status is that of the last command. | |
499 | exit | |
500 | } | |
501 | ||
502 | ECHO_C= ECHO_N= ECHO_T= | |
503 | case `echo -n x` in #((((( | |
504 | -n*) | |
505 | case `echo 'xy\c'` in | |
506 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
507 | xy) ECHO_C='\c';; | |
508 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
509 | ECHO_T=' ';; | |
510 | esac;; | |
511 | *) | |
512 | ECHO_N='-n';; | |
513 | esac | |
514 | ||
515 | rm -f conf$$ conf$$.exe conf$$.file | |
516 | if test -d conf$$.dir; then | |
517 | rm -f conf$$.dir/conf$$.file | |
518 | else | |
519 | rm -f conf$$.dir | |
520 | mkdir conf$$.dir 2>/dev/null | |
521 | fi | |
522 | if (echo >conf$$.file) 2>/dev/null; then | |
523 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
524 | as_ln_s='ln -s' | |
525 | # ... but there are two gotchas: | |
526 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
527 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
528 | # In both cases, we have to default to `cp -pR'. | |
529 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
530 | as_ln_s='cp -pR' | |
531 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
532 | as_ln_s=ln | |
533 | else | |
534 | as_ln_s='cp -pR' | |
535 | fi | |
536 | else | |
537 | as_ln_s='cp -pR' | |
538 | fi | |
539 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
540 | rmdir conf$$.dir 2>/dev/null | |
541 | ||
542 | if mkdir -p . 2>/dev/null; then | |
543 | as_mkdir_p='mkdir -p "$as_dir"' | |
544 | else | |
545 | test -d ./-p && rmdir ./-p | |
546 | as_mkdir_p=false | |
547 | fi | |
548 | ||
549 | as_test_x='test -x' | |
550 | as_executable_p=as_fn_executable_p | |
551 | ||
552 | # Sed expression to map a string onto a valid CPP name. | |
553 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
554 | ||
555 | # Sed expression to map a string onto a valid variable name. | |
556 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
557 | ||
558 | ||
559 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
560 | exec 6>&1 | |
561 | ||
562 | # Name of the host. | |
563 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, | |
564 | # so uname gets run too. | |
565 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
566 | ||
567 | # | |
568 | # Initializations. | |
569 | # | |
570 | ac_default_prefix=/usr/local | |
571 | ac_clean_files= | |
572 | ac_config_libobj_dir=. | |
573 | LIBOBJS= | |
574 | cross_compiling=no | |
575 | subdirs= | |
576 | MFLAGS= | |
577 | MAKEFLAGS= | |
578 | ||
579 | # Identity of this package. | |
580 | PACKAGE_NAME='i3lock' | |
581 | PACKAGE_TARNAME='i3lock' | |
582 | PACKAGE_VERSION='2.13' | |
583 | PACKAGE_STRING='i3lock 2.13' | |
584 | PACKAGE_BUGREPORT='https://github.com/i3/i3lock/issues' | |
585 | PACKAGE_URL='' | |
586 | ||
587 | ac_unique_file="i3lock.c" | |
588 | # Factoring default headers for most tests. | |
589 | ac_includes_default="\ | |
590 | #include <stdio.h> | |
591 | #ifdef HAVE_SYS_TYPES_H | |
592 | # include <sys/types.h> | |
593 | #endif | |
594 | #ifdef HAVE_SYS_STAT_H | |
595 | # include <sys/stat.h> | |
596 | #endif | |
597 | #ifdef STDC_HEADERS | |
598 | # include <stdlib.h> | |
599 | # include <stddef.h> | |
600 | #else | |
601 | # ifdef HAVE_STDLIB_H | |
602 | # include <stdlib.h> | |
603 | # endif | |
604 | #endif | |
605 | #ifdef HAVE_STRING_H | |
606 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
607 | # include <memory.h> | |
608 | # endif | |
609 | # include <string.h> | |
610 | #endif | |
611 | #ifdef HAVE_STRINGS_H | |
612 | # include <strings.h> | |
613 | #endif | |
614 | #ifdef HAVE_INTTYPES_H | |
615 | # include <inttypes.h> | |
616 | #endif | |
617 | #ifdef HAVE_STDINT_H | |
618 | # include <stdint.h> | |
619 | #endif | |
620 | #ifdef HAVE_UNISTD_H | |
621 | # include <unistd.h> | |
622 | #endif" | |
623 | ||
624 | ac_subst_vars='am__EXEEXT_FALSE | |
625 | am__EXEEXT_TRUE | |
626 | LTLIBOBJS | |
627 | AM_CFLAGS | |
628 | ac_ct_AR | |
629 | AR | |
630 | LN_S | |
631 | RANLIB | |
632 | CAIRO_LIBS | |
633 | CAIRO_CFLAGS | |
634 | XKBCOMMON_LIBS | |
635 | XKBCOMMON_CFLAGS | |
636 | XCB_UTIL_XRM_LIBS | |
637 | XCB_UTIL_XRM_CFLAGS | |
638 | XCB_UTIL_LIBS | |
639 | XCB_UTIL_CFLAGS | |
640 | XCB_IMAGE_LIBS | |
641 | XCB_IMAGE_CFLAGS | |
642 | XCB_LIBS | |
643 | XCB_CFLAGS | |
644 | PKG_CONFIG_LIBDIR | |
645 | PKG_CONFIG_PATH | |
646 | PKG_CONFIG | |
647 | LIBOBJS | |
648 | EGREP | |
649 | GREP | |
650 | CPP | |
651 | am__fastdepCC_FALSE | |
652 | am__fastdepCC_TRUE | |
653 | CCDEPMODE | |
654 | am__nodep | |
655 | AMDEPBACKSLASH | |
656 | AMDEP_FALSE | |
657 | AMDEP_TRUE | |
658 | am__include | |
659 | DEPDIR | |
660 | OBJEXT | |
661 | EXEEXT | |
662 | ac_ct_CC | |
663 | CPPFLAGS | |
664 | LDFLAGS | |
665 | CFLAGS | |
666 | CC | |
667 | CODE_COVERAGE_RULES | |
668 | CODE_COVERAGE_LDFLAGS | |
669 | CODE_COVERAGE_CXXFLAGS | |
670 | CODE_COVERAGE_CFLAGS | |
671 | CODE_COVERAGE_CPPFLAGS | |
672 | GENHTML | |
673 | LCOV | |
674 | GCOV | |
675 | CODE_COVERAGE_ENABLED | |
676 | CODE_COVERAGE_ENABLED_FALSE | |
677 | CODE_COVERAGE_ENABLED_TRUE | |
678 | SED | |
679 | I3LOCK_VERSION | |
680 | AX_EXTEND_SRCDIR_CPPFLAGS | |
681 | ifGNUmake | |
682 | MAINT | |
683 | MAINTAINER_MODE_FALSE | |
684 | MAINTAINER_MODE_TRUE | |
685 | AM_BACKSLASH | |
686 | AM_DEFAULT_VERBOSITY | |
687 | AM_DEFAULT_V | |
688 | AM_V | |
689 | am__untar | |
690 | am__tar | |
691 | AMTAR | |
692 | am__leading_dot | |
693 | SET_MAKE | |
694 | AWK | |
695 | mkdir_p | |
696 | MKDIR_P | |
697 | INSTALL_STRIP_PROGRAM | |
698 | STRIP | |
699 | install_sh | |
700 | MAKEINFO | |
701 | AUTOHEADER | |
702 | AUTOMAKE | |
703 | AUTOCONF | |
704 | ACLOCAL | |
705 | VERSION | |
706 | PACKAGE | |
707 | CYGPATH_W | |
708 | am__isrc | |
709 | INSTALL_DATA | |
710 | INSTALL_SCRIPT | |
711 | INSTALL_PROGRAM | |
712 | ax_enable_builddir_sed | |
713 | target_os | |
714 | target_vendor | |
715 | target_cpu | |
716 | target | |
717 | host_os | |
718 | host_vendor | |
719 | host_cpu | |
720 | host | |
721 | build_os | |
722 | build_vendor | |
723 | build_cpu | |
724 | build | |
725 | target_alias | |
726 | host_alias | |
727 | build_alias | |
728 | LIBS | |
729 | ECHO_T | |
730 | ECHO_N | |
731 | ECHO_C | |
732 | DEFS | |
733 | mandir | |
734 | localedir | |
735 | libdir | |
736 | psdir | |
737 | pdfdir | |
738 | dvidir | |
739 | htmldir | |
740 | infodir | |
741 | docdir | |
742 | oldincludedir | |
743 | includedir | |
744 | localstatedir | |
745 | sharedstatedir | |
746 | sysconfdir | |
747 | datadir | |
748 | datarootdir | |
749 | libexecdir | |
750 | sbindir | |
751 | bindir | |
752 | program_transform_name | |
753 | prefix | |
754 | exec_prefix | |
755 | PACKAGE_URL | |
756 | PACKAGE_BUGREPORT | |
757 | PACKAGE_STRING | |
758 | PACKAGE_VERSION | |
759 | PACKAGE_TARNAME | |
760 | PACKAGE_NAME | |
761 | PATH_SEPARATOR | |
762 | SHELL | |
763 | am__quote' | |
764 | ac_subst_files='' | |
765 | ac_user_opts=' | |
766 | enable_option_checking | |
767 | enable_builddir | |
768 | enable_silent_rules | |
769 | enable_maintainer_mode | |
770 | with_gcov | |
771 | enable_code_coverage | |
772 | enable_debug | |
773 | enable_dependency_tracking | |
774 | enable_sanitizers | |
775 | enable_address_sanitizer | |
776 | enable_memory_sanitizer | |
777 | enable_undefined_sanitizer | |
778 | ' | |
779 | ac_precious_vars='build_alias | |
780 | host_alias | |
781 | target_alias | |
782 | CC | |
783 | CFLAGS | |
784 | LDFLAGS | |
785 | LIBS | |
786 | CPPFLAGS | |
787 | CPP | |
788 | PKG_CONFIG | |
789 | PKG_CONFIG_PATH | |
790 | PKG_CONFIG_LIBDIR | |
791 | XCB_CFLAGS | |
792 | XCB_LIBS | |
793 | XCB_IMAGE_CFLAGS | |
794 | XCB_IMAGE_LIBS | |
795 | XCB_UTIL_CFLAGS | |
796 | XCB_UTIL_LIBS | |
797 | XCB_UTIL_XRM_CFLAGS | |
798 | XCB_UTIL_XRM_LIBS | |
799 | XKBCOMMON_CFLAGS | |
800 | XKBCOMMON_LIBS | |
801 | CAIRO_CFLAGS | |
802 | CAIRO_LIBS' | |
803 | ||
804 | ||
805 | # Initialize some variables set by options. | |
806 | ac_init_help= | |
807 | ac_init_version=false | |
808 | ac_unrecognized_opts= | |
809 | ac_unrecognized_sep= | |
810 | # The variables have the same names as the options, with | |
811 | # dashes changed to underlines. | |
812 | cache_file=/dev/null | |
813 | exec_prefix=NONE | |
814 | no_create= | |
815 | no_recursion= | |
816 | prefix=NONE | |
817 | program_prefix=NONE | |
818 | program_suffix=NONE | |
819 | program_transform_name=s,x,x, | |
820 | silent= | |
821 | site= | |
822 | srcdir= | |
823 | verbose= | |
824 | x_includes=NONE | |
825 | x_libraries=NONE | |
826 | ||
827 | # Installation directory options. | |
828 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
829 | # and all the variables that are supposed to be based on exec_prefix | |
830 | # by default will actually change. | |
831 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
832 | # (The list follows the same order as the GNU Coding Standards.) | |
833 | bindir='${exec_prefix}/bin' | |
834 | sbindir='${exec_prefix}/sbin' | |
835 | libexecdir='${exec_prefix}/libexec' | |
836 | datarootdir='${prefix}/share' | |
837 | datadir='${datarootdir}' | |
838 | sysconfdir='${prefix}/etc' | |
839 | sharedstatedir='${prefix}/com' | |
840 | localstatedir='${prefix}/var' | |
841 | includedir='${prefix}/include' | |
842 | oldincludedir='/usr/include' | |
843 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
844 | infodir='${datarootdir}/info' | |
845 | htmldir='${docdir}' | |
846 | dvidir='${docdir}' | |
847 | pdfdir='${docdir}' | |
848 | psdir='${docdir}' | |
849 | libdir='${exec_prefix}/lib' | |
850 | localedir='${datarootdir}/locale' | |
851 | mandir='${datarootdir}/man' | |
852 | ||
853 | ac_prev= | |
854 | ac_dashdash= | |
855 | for ac_option | |
856 | do | |
857 | # If the previous option needs an argument, assign it. | |
858 | if test -n "$ac_prev"; then | |
859 | eval $ac_prev=\$ac_option | |
860 | ac_prev= | |
861 | continue | |
862 | fi | |
863 | ||
864 | case $ac_option in | |
865 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
866 | *=) ac_optarg= ;; | |
867 | *) ac_optarg=yes ;; | |
868 | esac | |
869 | ||
870 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
871 | ||
872 | case $ac_dashdash$ac_option in | |
873 | --) | |
874 | ac_dashdash=yes ;; | |
875 | ||
876 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
877 | ac_prev=bindir ;; | |
878 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
879 | bindir=$ac_optarg ;; | |
880 | ||
881 | -build | --build | --buil | --bui | --bu) | |
882 | ac_prev=build_alias ;; | |
883 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
884 | build_alias=$ac_optarg ;; | |
885 | ||
886 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
887 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
888 | ac_prev=cache_file ;; | |
889 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
890 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
891 | cache_file=$ac_optarg ;; | |
892 | ||
893 | --config-cache | -C) | |
894 | cache_file=config.cache ;; | |
895 | ||
896 | -datadir | --datadir | --datadi | --datad) | |
897 | ac_prev=datadir ;; | |
898 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
899 | datadir=$ac_optarg ;; | |
900 | ||
901 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
902 | | --dataroo | --dataro | --datar) | |
903 | ac_prev=datarootdir ;; | |
904 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
905 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
906 | datarootdir=$ac_optarg ;; | |
907 | ||
908 | -disable-* | --disable-*) | |
909 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
910 | # Reject names that are not valid shell variable names. | |
911 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
912 | as_fn_error $? "invalid feature name: $ac_useropt" | |
913 | ac_useropt_orig=$ac_useropt | |
914 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
915 | case $ac_user_opts in | |
916 | *" | |
917 | "enable_$ac_useropt" | |
918 | "*) ;; | |
919 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
920 | ac_unrecognized_sep=', ';; | |
921 | esac | |
922 | eval enable_$ac_useropt=no ;; | |
923 | ||
924 | -docdir | --docdir | --docdi | --doc | --do) | |
925 | ac_prev=docdir ;; | |
926 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
927 | docdir=$ac_optarg ;; | |
928 | ||
929 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
930 | ac_prev=dvidir ;; | |
931 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
932 | dvidir=$ac_optarg ;; | |
933 | ||
934 | -enable-* | --enable-*) | |
935 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
936 | # Reject names that are not valid shell variable names. | |
937 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
938 | as_fn_error $? "invalid feature name: $ac_useropt" | |
939 | ac_useropt_orig=$ac_useropt | |
940 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
941 | case $ac_user_opts in | |
942 | *" | |
943 | "enable_$ac_useropt" | |
944 | "*) ;; | |
945 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
946 | ac_unrecognized_sep=', ';; | |
947 | esac | |
948 | eval enable_$ac_useropt=\$ac_optarg ;; | |
949 | ||
950 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
951 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
952 | | --exec | --exe | --ex) | |
953 | ac_prev=exec_prefix ;; | |
954 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
955 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
956 | | --exec=* | --exe=* | --ex=*) | |
957 | exec_prefix=$ac_optarg ;; | |
958 | ||
959 | -gas | --gas | --ga | --g) | |
960 | # Obsolete; use --with-gas. | |
961 | with_gas=yes ;; | |
962 | ||
963 | -help | --help | --hel | --he | -h) | |
964 | ac_init_help=long ;; | |
965 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
966 | ac_init_help=recursive ;; | |
967 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
968 | ac_init_help=short ;; | |
969 | ||
970 | -host | --host | --hos | --ho) | |
971 | ac_prev=host_alias ;; | |
972 | -host=* | --host=* | --hos=* | --ho=*) | |
973 | host_alias=$ac_optarg ;; | |
974 | ||
975 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
976 | ac_prev=htmldir ;; | |
977 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
978 | | --ht=*) | |
979 | htmldir=$ac_optarg ;; | |
980 | ||
981 | -includedir | --includedir | --includedi | --included | --include \ | |
982 | | --includ | --inclu | --incl | --inc) | |
983 | ac_prev=includedir ;; | |
984 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
985 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
986 | includedir=$ac_optarg ;; | |
987 | ||
988 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
989 | ac_prev=infodir ;; | |
990 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
991 | infodir=$ac_optarg ;; | |
992 | ||
993 | -libdir | --libdir | --libdi | --libd) | |
994 | ac_prev=libdir ;; | |
995 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
996 | libdir=$ac_optarg ;; | |
997 | ||
998 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
999 | | --libexe | --libex | --libe) | |
1000 | ac_prev=libexecdir ;; | |
1001 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1002 | | --libexe=* | --libex=* | --libe=*) | |
1003 | libexecdir=$ac_optarg ;; | |
1004 | ||
1005 | -localedir | --localedir | --localedi | --localed | --locale) | |
1006 | ac_prev=localedir ;; | |
1007 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1008 | localedir=$ac_optarg ;; | |
1009 | ||
1010 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
1011 | | --localstate | --localstat | --localsta | --localst | --locals) | |
1012 | ac_prev=localstatedir ;; | |
1013 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
1014 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
1015 | localstatedir=$ac_optarg ;; | |
1016 | ||
1017 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1018 | ac_prev=mandir ;; | |
1019 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
1020 | mandir=$ac_optarg ;; | |
1021 | ||
1022 | -nfp | --nfp | --nf) | |
1023 | # Obsolete; use --without-fp. | |
1024 | with_fp=no ;; | |
1025 | ||
1026 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
1027 | | --no-cr | --no-c | -n) | |
1028 | no_create=yes ;; | |
1029 | ||
1030 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1031 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1032 | no_recursion=yes ;; | |
1033 | ||
1034 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1035 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1036 | | --oldin | --oldi | --old | --ol | --o) | |
1037 | ac_prev=oldincludedir ;; | |
1038 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1039 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1040 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
1041 | oldincludedir=$ac_optarg ;; | |
1042 | ||
1043 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1044 | ac_prev=prefix ;; | |
1045 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
1046 | prefix=$ac_optarg ;; | |
1047 | ||
1048 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1049 | | --program-pre | --program-pr | --program-p) | |
1050 | ac_prev=program_prefix ;; | |
1051 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1052 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
1053 | program_prefix=$ac_optarg ;; | |
1054 | ||
1055 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1056 | | --program-suf | --program-su | --program-s) | |
1057 | ac_prev=program_suffix ;; | |
1058 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1059 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
1060 | program_suffix=$ac_optarg ;; | |
1061 | ||
1062 | -program-transform-name | --program-transform-name \ | |
1063 | | --program-transform-nam | --program-transform-na \ | |
1064 | | --program-transform-n | --program-transform- \ | |
1065 | | --program-transform | --program-transfor \ | |
1066 | | --program-transfo | --program-transf \ | |
1067 | | --program-trans | --program-tran \ | |
1068 | | --progr-tra | --program-tr | --program-t) | |
1069 | ac_prev=program_transform_name ;; | |
1070 | -program-transform-name=* | --program-transform-name=* \ | |
1071 | | --program-transform-nam=* | --program-transform-na=* \ | |
1072 | | --program-transform-n=* | --program-transform-=* \ | |
1073 | | --program-transform=* | --program-transfor=* \ | |
1074 | | --program-transfo=* | --program-transf=* \ | |
1075 | | --program-trans=* | --program-tran=* \ | |
1076 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
1077 | program_transform_name=$ac_optarg ;; | |
1078 | ||
1079 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
1080 | ac_prev=pdfdir ;; | |
1081 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1082 | pdfdir=$ac_optarg ;; | |
1083 | ||
1084 | -psdir | --psdir | --psdi | --psd | --ps) | |
1085 | ac_prev=psdir ;; | |
1086 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1087 | psdir=$ac_optarg ;; | |
1088 | ||
1089 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1090 | | -silent | --silent | --silen | --sile | --sil) | |
1091 | silent=yes ;; | |
1092 | ||
1093 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1094 | ac_prev=sbindir ;; | |
1095 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1096 | | --sbi=* | --sb=*) | |
1097 | sbindir=$ac_optarg ;; | |
1098 | ||
1099 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1100 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1101 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1102 | | --sha | --sh) | |
1103 | ac_prev=sharedstatedir ;; | |
1104 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1105 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1106 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1107 | | --sha=* | --sh=*) | |
1108 | sharedstatedir=$ac_optarg ;; | |
1109 | ||
1110 | -site | --site | --sit) | |
1111 | ac_prev=site ;; | |
1112 | -site=* | --site=* | --sit=*) | |
1113 | site=$ac_optarg ;; | |
1114 | ||
1115 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1116 | ac_prev=srcdir ;; | |
1117 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1118 | srcdir=$ac_optarg ;; | |
1119 | ||
1120 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1121 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1122 | ac_prev=sysconfdir ;; | |
1123 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1124 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
1125 | sysconfdir=$ac_optarg ;; | |
1126 | ||
1127 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
1128 | ac_prev=target_alias ;; | |
1129 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
1130 | target_alias=$ac_optarg ;; | |
1131 | ||
1132 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1133 | verbose=yes ;; | |
1134 | ||
1135 | -version | --version | --versio | --versi | --vers | -V) | |
1136 | ac_init_version=: ;; | |
1137 | ||
1138 | -with-* | --with-*) | |
1139 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
1140 | # Reject names that are not valid shell variable names. | |
1141 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
1142 | as_fn_error $? "invalid package name: $ac_useropt" | |
1143 | ac_useropt_orig=$ac_useropt | |
1144 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1145 | case $ac_user_opts in | |
1146 | *" | |
1147 | "with_$ac_useropt" | |
1148 | "*) ;; | |
1149 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1150 | ac_unrecognized_sep=', ';; | |
1151 | esac | |
1152 | eval with_$ac_useropt=\$ac_optarg ;; | |
1153 | ||
1154 | -without-* | --without-*) | |
1155 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
1156 | # Reject names that are not valid shell variable names. | |
1157 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
1158 | as_fn_error $? "invalid package name: $ac_useropt" | |
1159 | ac_useropt_orig=$ac_useropt | |
1160 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1161 | case $ac_user_opts in | |
1162 | *" | |
1163 | "with_$ac_useropt" | |
1164 | "*) ;; | |
1165 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1166 | ac_unrecognized_sep=', ';; | |
1167 | esac | |
1168 | eval with_$ac_useropt=no ;; | |
1169 | ||
1170 | --x) | |
1171 | # Obsolete; use --with-x. | |
1172 | with_x=yes ;; | |
1173 | ||
1174 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1175 | | --x-incl | --x-inc | --x-in | --x-i) | |
1176 | ac_prev=x_includes ;; | |
1177 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1178 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
1179 | x_includes=$ac_optarg ;; | |
1180 | ||
1181 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1182 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1183 | ac_prev=x_libraries ;; | |
1184 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1185 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
1186 | x_libraries=$ac_optarg ;; | |
1187 | ||
1188 | -*) as_fn_error $? "unrecognized option: \`$ac_option' | |
1189 | Try \`$0 --help' for more information" | |
1190 | ;; | |
1191 | ||
1192 | *=*) | |
1193 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1194 | # Reject names that are not valid shell variable names. | |
1195 | case $ac_envvar in #( | |
1196 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1197 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; | |
1198 | esac | |
1199 | eval $ac_envvar=\$ac_optarg | |
1200 | export $ac_envvar ;; | |
1201 | ||
1202 | *) | |
1203 | # FIXME: should be removed in autoconf 3.0. | |
1204 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
1205 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
1206 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
1207 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" | |
1208 | ;; | |
1209 | ||
1210 | esac | |
1211 | done | |
1212 | ||
1213 | if test -n "$ac_prev"; then | |
1214 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
1215 | as_fn_error $? "missing argument to $ac_option" | |
1216 | fi | |
1217 | ||
1218 | if test -n "$ac_unrecognized_opts"; then | |
1219 | case $enable_option_checking in | |
1220 | no) ;; | |
1221 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; | |
1222 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
1223 | esac | |
1224 | fi | |
1225 | ||
1226 | # Check all directory arguments for consistency. | |
1227 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1228 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1229 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1230 | libdir localedir mandir | |
1231 | do | |
1232 | eval ac_val=\$$ac_var | |
1233 | # Remove trailing slashes. | |
1234 | case $ac_val in | |
1235 | */ ) | |
1236 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1237 | eval $ac_var=\$ac_val;; | |
1238 | esac | |
1239 | # Be sure to have absolute directory names. | |
1240 | case $ac_val in | |
1241 | [\\/$]* | ?:[\\/]* ) continue;; | |
1242 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1243 | esac | |
1244 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" | |
1245 | done | |
1246 | ||
1247 | # There might be people who depend on the old broken behavior: `$host' | |
1248 | # used to hold the argument of --host etc. | |
1249 | # FIXME: To remove some day. | |
1250 | build=$build_alias | |
1251 | host=$host_alias | |
1252 | target=$target_alias | |
1253 | ||
1254 | # FIXME: To remove some day. | |
1255 | if test "x$host_alias" != x; then | |
1256 | if test "x$build_alias" = x; then | |
1257 | cross_compiling=maybe | |
1258 | elif test "x$build_alias" != "x$host_alias"; then | |
1259 | cross_compiling=yes | |
1260 | fi | |
1261 | fi | |
1262 | ||
1263 | ac_tool_prefix= | |
1264 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1265 | ||
1266 | test "$silent" = yes && exec 6>/dev/null | |
1267 | ||
1268 | ||
1269 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
1270 | ac_ls_di=`ls -di .` && | |
1271 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1272 | as_fn_error $? "working directory cannot be determined" | |
1273 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1274 | as_fn_error $? "pwd does not report name of working directory" | |
1275 | ||
1276 | ||
1277 | # Find the source files, if location was not specified. | |
1278 | if test -z "$srcdir"; then | |
1279 | ac_srcdir_defaulted=yes | |
1280 | # Try the directory containing this script, then the parent directory. | |
1281 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1282 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1283 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1284 | X"$as_myself" : 'X\(//\)$' \| \ | |
1285 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1286 | $as_echo X"$as_myself" | | |
1287 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1288 | s//\1/ | |
1289 | q | |
1290 | } | |
1291 | /^X\(\/\/\)[^/].*/{ | |
1292 | s//\1/ | |
1293 | q | |
1294 | } | |
1295 | /^X\(\/\/\)$/{ | |
1296 | s//\1/ | |
1297 | q | |
1298 | } | |
1299 | /^X\(\/\).*/{ | |
1300 | s//\1/ | |
1301 | q | |
1302 | } | |
1303 | s/.*/./; q'` | |
1304 | srcdir=$ac_confdir | |
1305 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1306 | srcdir=.. | |
1307 | fi | |
1308 | else | |
1309 | ac_srcdir_defaulted=no | |
1310 | fi | |
1311 | if test ! -r "$srcdir/$ac_unique_file"; then | |
1312 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1313 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" | |
1314 | fi | |
1315 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1316 | ac_abs_confdir=`( | |
1317 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" | |
1318 | pwd)` | |
1319 | # When building in place, set srcdir=. | |
1320 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1321 | srcdir=. | |
1322 | fi | |
1323 | # Remove unnecessary trailing slashes from srcdir. | |
1324 | # Double slashes in file names in object file debugging info | |
1325 | # mess up M-x gdb in Emacs. | |
1326 | case $srcdir in | |
1327 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1328 | esac | |
1329 | for ac_var in $ac_precious_vars; do | |
1330 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1331 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1332 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1333 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1334 | done | |
1335 | ||
1336 | # | |
1337 | # Report the --help message. | |
1338 | # | |
1339 | if test "$ac_init_help" = "long"; then | |
1340 | # Omit some internal or obsolete options to make the list less imposing. | |
1341 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1342 | cat <<_ACEOF | |
1343 | \`configure' configures i3lock 2.13 to adapt to many kinds of systems. | |
1344 | ||
1345 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1346 | ||
1347 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1348 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1349 | ||
1350 | Defaults for the options are specified in brackets. | |
1351 | ||
1352 | Configuration: | |
1353 | -h, --help display this help and exit | |
1354 | --help=short display options specific to this package | |
1355 | --help=recursive display the short help of all the included packages | |
1356 | -V, --version display version information and exit | |
1357 | -q, --quiet, --silent do not print \`checking ...' messages | |
1358 | --cache-file=FILE cache test results in FILE [disabled] | |
1359 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1360 | -n, --no-create do not create output files | |
1361 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1362 | ||
1363 | Installation directories: | |
1364 | --prefix=PREFIX install architecture-independent files in PREFIX | |
1365 | [$ac_default_prefix] | |
1366 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1367 | [PREFIX] | |
1368 | ||
1369 | By default, \`make install' will install all the files in | |
1370 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1371 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1372 | for instance \`--prefix=\$HOME'. | |
1373 | ||
1374 | For better control, use the options below. | |
1375 | ||
1376 | Fine tuning of the installation directories: | |
1377 | --bindir=DIR user executables [EPREFIX/bin] | |
1378 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1379 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1380 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1381 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1382 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1383 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1384 | --includedir=DIR C header files [PREFIX/include] | |
1385 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1386 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1387 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1388 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1389 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1390 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1391 | --docdir=DIR documentation root [DATAROOTDIR/doc/i3lock] | |
1392 | --htmldir=DIR html documentation [DOCDIR] | |
1393 | --dvidir=DIR dvi documentation [DOCDIR] | |
1394 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1395 | --psdir=DIR ps documentation [DOCDIR] | |
1396 | _ACEOF | |
1397 | ||
1398 | cat <<\_ACEOF | |
1399 | ||
1400 | Program names: | |
1401 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1402 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1403 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1404 | ||
1405 | System types: | |
1406 | --build=BUILD configure for building on BUILD [guessed] | |
1407 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1408 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1409 | _ACEOF | |
1410 | fi | |
1411 | ||
1412 | if test -n "$ac_init_help"; then | |
1413 | case $ac_init_help in | |
1414 | short | recursive ) echo "Configuration of i3lock 2.13:";; | |
1415 | esac | |
1416 | cat <<\_ACEOF | |
1417 | ||
1418 | Optional Features: | |
1419 | --disable-option-checking ignore unrecognized --enable/--with options | |
1420 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1421 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1422 | --disable-builddir disable automatic build in subdir of sources | |
1423 | ||
1424 | --enable-silent-rules less verbose build output (undo: "make V=1") | |
1425 | --disable-silent-rules verbose build output (undo: "make V=0") | |
1426 | --disable-maintainer-mode | |
1427 | disable make rules and dependencies not useful (and | |
1428 | sometimes confusing) to the casual installer | |
1429 | --enable-code-coverage Whether to enable code coverage support | |
1430 | --enable-debug=[yes/info/profile/no] | |
1431 | compile with debugging | |
1432 | --enable-dependency-tracking | |
1433 | do not reject slow dependency extractors | |
1434 | --disable-dependency-tracking | |
1435 | speeds up one-time build | |
1436 | --enable-sanitizers enable all known sanitizers | |
1437 | --enable-address-sanitizer | |
1438 | enable -fsanitize=address | |
1439 | --enable-memory-sanitizer | |
1440 | enable -fsanitize=memory | |
1441 | --enable-undefined-sanitizer | |
1442 | enable -fsanitize=undefined | |
1443 | ||
1444 | Optional Packages: | |
1445 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1446 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1447 | --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). | |
1448 | ||
1449 | Some influential environment variables: | |
1450 | CC C compiler command | |
1451 | CFLAGS C compiler flags | |
1452 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1453 | nonstandard directory <lib dir> | |
1454 | LIBS libraries to pass to the linker, e.g. -l<library> | |
1455 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
1456 | you have headers in a nonstandard directory <include dir> | |
1457 | CPP C preprocessor | |
1458 | PKG_CONFIG path to pkg-config utility | |
1459 | PKG_CONFIG_PATH | |
1460 | directories to add to pkg-config's search path | |
1461 | PKG_CONFIG_LIBDIR | |
1462 | path overriding pkg-config's built-in search path | |
1463 | XCB_CFLAGS C compiler flags for XCB, overriding pkg-config | |
1464 | XCB_LIBS linker flags for XCB, overriding pkg-config | |
1465 | XCB_IMAGE_CFLAGS | |
1466 | C compiler flags for XCB_IMAGE, overriding pkg-config | |
1467 | XCB_IMAGE_LIBS | |
1468 | linker flags for XCB_IMAGE, overriding pkg-config | |
1469 | XCB_UTIL_CFLAGS | |
1470 | C compiler flags for XCB_UTIL, overriding pkg-config | |
1471 | XCB_UTIL_LIBS | |
1472 | linker flags for XCB_UTIL, overriding pkg-config | |
1473 | XCB_UTIL_XRM_CFLAGS | |
1474 | C compiler flags for XCB_UTIL_XRM, overriding pkg-config | |
1475 | XCB_UTIL_XRM_LIBS | |
1476 | linker flags for XCB_UTIL_XRM, overriding pkg-config | |
1477 | XKBCOMMON_CFLAGS | |
1478 | C compiler flags for XKBCOMMON, overriding pkg-config | |
1479 | XKBCOMMON_LIBS | |
1480 | linker flags for XKBCOMMON, overriding pkg-config | |
1481 | CAIRO_CFLAGS | |
1482 | C compiler flags for CAIRO, overriding pkg-config | |
1483 | CAIRO_LIBS linker flags for CAIRO, overriding pkg-config | |
1484 | ||
1485 | Use these variables to override the choices made by `configure' or to help | |
1486 | it to find libraries and programs with nonstandard names/locations. | |
1487 | ||
1488 | Report bugs to <https://github.com/i3/i3lock/issues>. | |
1489 | _ACEOF | |
1490 | ac_status=$? | |
1491 | fi | |
1492 | ||
1493 | if test "$ac_init_help" = "recursive"; then | |
1494 | # If there are subdirs, report their specific --help. | |
1495 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1496 | test -d "$ac_dir" || | |
1497 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1498 | continue | |
1499 | ac_builddir=. | |
1500 | ||
1501 | case "$ac_dir" in | |
1502 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1503 | *) | |
1504 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1505 | # A ".." for each directory in $ac_dir_suffix. | |
1506 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1507 | case $ac_top_builddir_sub in | |
1508 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1509 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1510 | esac ;; | |
1511 | esac | |
1512 | ac_abs_top_builddir=$ac_pwd | |
1513 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1514 | # for backward compatibility: | |
1515 | ac_top_builddir=$ac_top_build_prefix | |
1516 | ||
1517 | case $srcdir in | |
1518 | .) # We are building in place. | |
1519 | ac_srcdir=. | |
1520 | ac_top_srcdir=$ac_top_builddir_sub | |
1521 | ac_abs_top_srcdir=$ac_pwd ;; | |
1522 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
1523 | ac_srcdir=$srcdir$ac_dir_suffix; | |
1524 | ac_top_srcdir=$srcdir | |
1525 | ac_abs_top_srcdir=$srcdir ;; | |
1526 | *) # Relative name. | |
1527 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1528 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1529 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
1530 | esac | |
1531 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
1532 | ||
1533 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1534 | # Check for guested configure. | |
1535 | if test -f "$ac_srcdir/configure.gnu"; then | |
1536 | echo && | |
1537 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1538 | elif test -f "$ac_srcdir/configure"; then | |
1539 | echo && | |
1540 | $SHELL "$ac_srcdir/configure" --help=recursive | |
1541 | else | |
1542 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1543 | fi || ac_status=$? | |
1544 | cd "$ac_pwd" || { ac_status=$?; break; } | |
1545 | done | |
1546 | fi | |
1547 | ||
1548 | test -n "$ac_init_help" && exit $ac_status | |
1549 | if $ac_init_version; then | |
1550 | cat <<\_ACEOF | |
1551 | i3lock configure 2.13 | |
1552 | generated by GNU Autoconf 2.69 | |
1553 | ||
1554 | Copyright (C) 2012 Free Software Foundation, Inc. | |
1555 | This configure script is free software; the Free Software Foundation | |
1556 | gives unlimited permission to copy, distribute and modify it. | |
1557 | _ACEOF | |
1558 | exit | |
1559 | fi | |
1560 | ||
1561 | ## ------------------------ ## | |
1562 | ## Autoconf initialization. ## | |
1563 | ## ------------------------ ## | |
1564 | ||
1565 | # ac_fn_c_try_compile LINENO | |
1566 | # -------------------------- | |
1567 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1568 | ac_fn_c_try_compile () | |
1569 | { | |
1570 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1571 | rm -f conftest.$ac_objext | |
1572 | if { { ac_try="$ac_compile" | |
1573 | case "(($ac_try" in | |
1574 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1575 | *) ac_try_echo=$ac_try;; | |
1576 | esac | |
1577 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1578 | $as_echo "$ac_try_echo"; } >&5 | |
1579 | (eval "$ac_compile") 2>conftest.err | |
1580 | ac_status=$? | |
1581 | if test -s conftest.err; then | |
1582 | grep -v '^ *+' conftest.err >conftest.er1 | |
1583 | cat conftest.er1 >&5 | |
1584 | mv -f conftest.er1 conftest.err | |
1585 | fi | |
1586 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1587 | test $ac_status = 0; } && { | |
1588 | test -z "$ac_c_werror_flag" || | |
1589 | test ! -s conftest.err | |
1590 | } && test -s conftest.$ac_objext; then : | |
1591 | ac_retval=0 | |
1592 | else | |
1593 | $as_echo "$as_me: failed program was:" >&5 | |
1594 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1595 | ||
1596 | ac_retval=1 | |
1597 | fi | |
1598 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1599 | as_fn_set_status $ac_retval | |
1600 | ||
1601 | } # ac_fn_c_try_compile | |
1602 | ||
1603 | # ac_fn_c_try_cpp LINENO | |
1604 | # ---------------------- | |
1605 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1606 | ac_fn_c_try_cpp () | |
1607 | { | |
1608 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1609 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1610 | case "(($ac_try" in | |
1611 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1612 | *) ac_try_echo=$ac_try;; | |
1613 | esac | |
1614 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1615 | $as_echo "$ac_try_echo"; } >&5 | |
1616 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1617 | ac_status=$? | |
1618 | if test -s conftest.err; then | |
1619 | grep -v '^ *+' conftest.err >conftest.er1 | |
1620 | cat conftest.er1 >&5 | |
1621 | mv -f conftest.er1 conftest.err | |
1622 | fi | |
1623 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1624 | test $ac_status = 0; } > conftest.i && { | |
1625 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1626 | test ! -s conftest.err | |
1627 | }; then : | |
1628 | ac_retval=0 | |
1629 | else | |
1630 | $as_echo "$as_me: failed program was:" >&5 | |
1631 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1632 | ||
1633 | ac_retval=1 | |
1634 | fi | |
1635 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1636 | as_fn_set_status $ac_retval | |
1637 | ||
1638 | } # ac_fn_c_try_cpp | |
1639 | ||
1640 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1641 | # ------------------------------------------------------- | |
1642 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1643 | # the include files in INCLUDES and setting the cache variable VAR | |
1644 | # accordingly. | |
1645 | ac_fn_c_check_header_mongrel () | |
1646 | { | |
1647 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1648 | if eval \${$3+:} false; then : | |
1649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1650 | $as_echo_n "checking for $2... " >&6; } | |
1651 | if eval \${$3+:} false; then : | |
1652 | $as_echo_n "(cached) " >&6 | |
1653 | fi | |
1654 | eval ac_res=\$$3 | |
1655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1656 | $as_echo "$ac_res" >&6; } | |
1657 | else | |
1658 | # Is the header compilable? | |
1659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1660 | $as_echo_n "checking $2 usability... " >&6; } | |
1661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1662 | /* end confdefs.h. */ | |
1663 | $4 | |
1664 | #include <$2> | |
1665 | _ACEOF | |
1666 | if ac_fn_c_try_compile "$LINENO"; then : | |
1667 | ac_header_compiler=yes | |
1668 | else | |
1669 | ac_header_compiler=no | |
1670 | fi | |
1671 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1673 | $as_echo "$ac_header_compiler" >&6; } | |
1674 | ||
1675 | # Is the header present? | |
1676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1677 | $as_echo_n "checking $2 presence... " >&6; } | |
1678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1679 | /* end confdefs.h. */ | |
1680 | #include <$2> | |
1681 | _ACEOF | |
1682 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1683 | ac_header_preproc=yes | |
1684 | else | |
1685 | ac_header_preproc=no | |
1686 | fi | |
1687 | rm -f conftest.err conftest.i conftest.$ac_ext | |
1688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1689 | $as_echo "$ac_header_preproc" >&6; } | |
1690 | ||
1691 | # So? What about this header? | |
1692 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1693 | yes:no: ) | |
1694 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1695 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1696 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1697 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1698 | ;; | |
1699 | no:yes:* ) | |
1700 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1701 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1702 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1703 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1704 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1705 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1706 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1707 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1708 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1709 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1710 | ( $as_echo "## -------------------------------------------------- ## | |
1711 | ## Report this to https://github.com/i3/i3lock/issues ## | |
1712 | ## -------------------------------------------------- ##" | |
1713 | ) | sed "s/^/$as_me: WARNING: /" >&2 | |
1714 | ;; | |
1715 | esac | |
1716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1717 | $as_echo_n "checking for $2... " >&6; } | |
1718 | if eval \${$3+:} false; then : | |
1719 | $as_echo_n "(cached) " >&6 | |
1720 | else | |
1721 | eval "$3=\$ac_header_compiler" | |
1722 | fi | |
1723 | eval ac_res=\$$3 | |
1724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1725 | $as_echo "$ac_res" >&6; } | |
1726 | fi | |
1727 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1728 | ||
1729 | } # ac_fn_c_check_header_mongrel | |
1730 | ||
1731 | # ac_fn_c_try_run LINENO | |
1732 | # ---------------------- | |
1733 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1734 | # that executables *can* be run. | |
1735 | ac_fn_c_try_run () | |
1736 | { | |
1737 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1738 | if { { ac_try="$ac_link" | |
1739 | case "(($ac_try" in | |
1740 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1741 | *) ac_try_echo=$ac_try;; | |
1742 | esac | |
1743 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1744 | $as_echo "$ac_try_echo"; } >&5 | |
1745 | (eval "$ac_link") 2>&5 | |
1746 | ac_status=$? | |
1747 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1748 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1749 | { { case "(($ac_try" in | |
1750 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1751 | *) ac_try_echo=$ac_try;; | |
1752 | esac | |
1753 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1754 | $as_echo "$ac_try_echo"; } >&5 | |
1755 | (eval "$ac_try") 2>&5 | |
1756 | ac_status=$? | |
1757 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1758 | test $ac_status = 0; }; }; then : | |
1759 | ac_retval=0 | |
1760 | else | |
1761 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1762 | $as_echo "$as_me: failed program was:" >&5 | |
1763 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1764 | ||
1765 | ac_retval=$ac_status | |
1766 | fi | |
1767 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1768 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1769 | as_fn_set_status $ac_retval | |
1770 | ||
1771 | } # ac_fn_c_try_run | |
1772 | ||
1773 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1774 | # ------------------------------------------------------- | |
1775 | # Tests whether HEADER exists and can be compiled using the include files in | |
1776 | # INCLUDES, setting the cache variable VAR accordingly. | |
1777 | ac_fn_c_check_header_compile () | |
1778 | { | |
1779 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1781 | $as_echo_n "checking for $2... " >&6; } | |
1782 | if eval \${$3+:} false; then : | |
1783 | $as_echo_n "(cached) " >&6 | |
1784 | else | |
1785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1786 | /* end confdefs.h. */ | |
1787 | $4 | |
1788 | #include <$2> | |
1789 | _ACEOF | |
1790 | if ac_fn_c_try_compile "$LINENO"; then : | |
1791 | eval "$3=yes" | |
1792 | else | |
1793 | eval "$3=no" | |
1794 | fi | |
1795 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1796 | fi | |
1797 | eval ac_res=\$$3 | |
1798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1799 | $as_echo "$ac_res" >&6; } | |
1800 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1801 | ||
1802 | } # ac_fn_c_check_header_compile | |
1803 | ||
1804 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
1805 | # ------------------------------------------- | |
1806 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
1807 | # variable VAR accordingly. | |
1808 | ac_fn_c_check_type () | |
1809 | { | |
1810 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1812 | $as_echo_n "checking for $2... " >&6; } | |
1813 | if eval \${$3+:} false; then : | |
1814 | $as_echo_n "(cached) " >&6 | |
1815 | else | |
1816 | eval "$3=no" | |
1817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1818 | /* end confdefs.h. */ | |
1819 | $4 | |
1820 | int | |
1821 | main () | |
1822 | { | |
1823 | if (sizeof ($2)) | |
1824 | return 0; | |
1825 | ; | |
1826 | return 0; | |
1827 | } | |
1828 | _ACEOF | |
1829 | if ac_fn_c_try_compile "$LINENO"; then : | |
1830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1831 | /* end confdefs.h. */ | |
1832 | $4 | |
1833 | int | |
1834 | main () | |
1835 | { | |
1836 | if (sizeof (($2))) | |
1837 | return 0; | |
1838 | ; | |
1839 | return 0; | |
1840 | } | |
1841 | _ACEOF | |
1842 | if ac_fn_c_try_compile "$LINENO"; then : | |
1843 | ||
1844 | else | |
1845 | eval "$3=yes" | |
1846 | fi | |
1847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1848 | fi | |
1849 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1850 | fi | |
1851 | eval ac_res=\$$3 | |
1852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1853 | $as_echo "$ac_res" >&6; } | |
1854 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1855 | ||
1856 | } # ac_fn_c_check_type | |
1857 | ||
1858 | # ac_fn_c_try_link LINENO | |
1859 | # ----------------------- | |
1860 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1861 | ac_fn_c_try_link () | |
1862 | { | |
1863 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1864 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1865 | if { { ac_try="$ac_link" | |
1866 | case "(($ac_try" in | |
1867 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1868 | *) ac_try_echo=$ac_try;; | |
1869 | esac | |
1870 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1871 | $as_echo "$ac_try_echo"; } >&5 | |
1872 | (eval "$ac_link") 2>conftest.err | |
1873 | ac_status=$? | |
1874 | if test -s conftest.err; then | |
1875 | grep -v '^ *+' conftest.err >conftest.er1 | |
1876 | cat conftest.er1 >&5 | |
1877 | mv -f conftest.er1 conftest.err | |
1878 | fi | |
1879 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1880 | test $ac_status = 0; } && { | |
1881 | test -z "$ac_c_werror_flag" || | |
1882 | test ! -s conftest.err | |
1883 | } && test -s conftest$ac_exeext && { | |
1884 | test "$cross_compiling" = yes || | |
1885 | test -x conftest$ac_exeext | |
1886 | }; then : | |
1887 | ac_retval=0 | |
1888 | else | |
1889 | $as_echo "$as_me: failed program was:" >&5 | |
1890 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1891 | ||
1892 | ac_retval=1 | |
1893 | fi | |
1894 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1895 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1896 | # interfere with the next link command; also delete a directory that is | |
1897 | # left behind by Apple's compiler. We do this before executing the actions. | |
1898 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1899 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1900 | as_fn_set_status $ac_retval | |
1901 | ||
1902 | } # ac_fn_c_try_link | |
1903 | ||
1904 | # ac_fn_c_check_func LINENO FUNC VAR | |
1905 | # ---------------------------------- | |
1906 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1907 | ac_fn_c_check_func () | |
1908 | { | |
1909 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1911 | $as_echo_n "checking for $2... " >&6; } | |
1912 | if eval \${$3+:} false; then : | |
1913 | $as_echo_n "(cached) " >&6 | |
1914 | else | |
1915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1916 | /* end confdefs.h. */ | |
1917 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1918 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1919 | #define $2 innocuous_$2 | |
1920 | ||
1921 | /* System header to define __stub macros and hopefully few prototypes, | |
1922 | which can conflict with char $2 (); below. | |
1923 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1924 | <limits.h> exists even on freestanding compilers. */ | |
1925 | ||
1926 | #ifdef __STDC__ | |
1927 | # include <limits.h> | |
1928 | #else | |
1929 | # include <assert.h> | |
1930 | #endif | |
1931 | ||
1932 | #undef $2 | |
1933 | ||
1934 | /* Override any GCC internal prototype to avoid an error. | |
1935 | Use char because int might match the return type of a GCC | |
1936 | builtin and then its argument prototype would still apply. */ | |
1937 | #ifdef __cplusplus | |
1938 | extern "C" | |
1939 | #endif | |
1940 | char $2 (); | |
1941 | /* The GNU C library defines this for functions which it implements | |
1942 | to always fail with ENOSYS. Some functions are actually named | |
1943 | something starting with __ and the normal name is an alias. */ | |
1944 | #if defined __stub_$2 || defined __stub___$2 | |
1945 | choke me | |
1946 | #endif | |
1947 | ||
1948 | int | |
1949 | main () | |
1950 | { | |
1951 | return $2 (); | |
1952 | ; | |
1953 | return 0; | |
1954 | } | |
1955 | _ACEOF | |
1956 | if ac_fn_c_try_link "$LINENO"; then : | |
1957 | eval "$3=yes" | |
1958 | else | |
1959 | eval "$3=no" | |
1960 | fi | |
1961 | rm -f core conftest.err conftest.$ac_objext \ | |
1962 | conftest$ac_exeext conftest.$ac_ext | |
1963 | fi | |
1964 | eval ac_res=\$$3 | |
1965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1966 | $as_echo "$ac_res" >&6; } | |
1967 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1968 | ||
1969 | } # ac_fn_c_check_func | |
1970 | cat >config.log <<_ACEOF | |
1971 | This file contains any messages produced by compilers while | |
1972 | running configure, to aid debugging if configure makes a mistake. | |
1973 | ||
1974 | It was created by i3lock $as_me 2.13, which was | |
1975 | generated by GNU Autoconf 2.69. Invocation command line was | |
1976 | ||
1977 | $ $0 $@ | |
1978 | ||
1979 | _ACEOF | |
1980 | exec 5>>config.log | |
1981 | { | |
1982 | cat <<_ASUNAME | |
1983 | ## --------- ## | |
1984 | ## Platform. ## | |
1985 | ## --------- ## | |
1986 | ||
1987 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1988 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1989 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1990 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1991 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1992 | ||
1993 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1994 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1995 | ||
1996 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1997 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1998 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1999 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2000 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2001 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2002 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2003 | ||
2004 | _ASUNAME | |
2005 | ||
2006 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2007 | for as_dir in $PATH | |
2008 | do | |
2009 | IFS=$as_save_IFS | |
2010 | test -z "$as_dir" && as_dir=. | |
2011 | $as_echo "PATH: $as_dir" | |
2012 | done | |
2013 | IFS=$as_save_IFS | |
2014 | ||
2015 | } >&5 | |
2016 | ||
2017 | cat >&5 <<_ACEOF | |
2018 | ||
2019 | ||
2020 | ## ----------- ## | |
2021 | ## Core tests. ## | |
2022 | ## ----------- ## | |
2023 | ||
2024 | _ACEOF | |
2025 | ||
2026 | ||
2027 | # Keep a trace of the command line. | |
2028 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2029 | # Strip out --silent because we don't want to record it for future runs. | |
2030 | # Also quote any args containing shell meta-characters. | |
2031 | # Make two passes to allow for proper duplicate-argument suppression. | |
2032 | ac_configure_args= | |
2033 | ac_configure_args0= | |
2034 | ac_configure_args1= | |
2035 | ac_must_keep_next=false | |
2036 | for ac_pass in 1 2 | |
2037 | do | |
2038 | for ac_arg | |
2039 | do | |
2040 | case $ac_arg in | |
2041 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2042 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2043 | | -silent | --silent | --silen | --sile | --sil) | |
2044 | continue ;; | |
2045 | *\'*) | |
2046 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2047 | esac | |
2048 | case $ac_pass in | |
2049 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2050 | 2) | |
2051 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2052 | if test $ac_must_keep_next = true; then | |
2053 | ac_must_keep_next=false # Got value, back to normal. | |
2054 | else | |
2055 | case $ac_arg in | |
2056 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2057 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2058 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2059 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2060 | case "$ac_configure_args0 " in | |
2061 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2062 | esac | |
2063 | ;; | |
2064 | -* ) ac_must_keep_next=true ;; | |
2065 | esac | |
2066 | fi | |
2067 | as_fn_append ac_configure_args " '$ac_arg'" | |
2068 | ;; | |
2069 | esac | |
2070 | done | |
2071 | done | |
2072 | { ac_configure_args0=; unset ac_configure_args0;} | |
2073 | { ac_configure_args1=; unset ac_configure_args1;} | |
2074 | ||
2075 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2076 | # config.log. We remove comments because anyway the quotes in there | |
2077 | # would cause problems or look ugly. | |
2078 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2079 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2080 | trap 'exit_status=$? | |
2081 | # Save into config.log some information that might help in debugging. | |
2082 | { | |
2083 | echo | |
2084 | ||
2085 | $as_echo "## ---------------- ## | |
2086 | ## Cache variables. ## | |
2087 | ## ---------------- ##" | |
2088 | echo | |
2089 | # The following way of writing the cache mishandles newlines in values, | |
2090 | ( | |
2091 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2092 | eval ac_val=\$$ac_var | |
2093 | case $ac_val in #( | |
2094 | *${as_nl}*) | |
2095 | case $ac_var in #( | |
2096 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2097 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2098 | esac | |
2099 | case $ac_var in #( | |
2100 | _ | IFS | as_nl) ;; #( | |
2101 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2102 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2103 | esac ;; | |
2104 | esac | |
2105 | done | |
2106 | (set) 2>&1 | | |
2107 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2108 | *${as_nl}ac_space=\ *) | |
2109 | sed -n \ | |
2110 | "s/'\''/'\''\\\\'\'''\''/g; | |
2111 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2112 | ;; #( | |
2113 | *) | |
2114 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2115 | ;; | |
2116 | esac | | |
2117 | sort | |
2118 | ) | |
2119 | echo | |
2120 | ||
2121 | $as_echo "## ----------------- ## | |
2122 | ## Output variables. ## | |
2123 | ## ----------------- ##" | |
2124 | echo | |
2125 | for ac_var in $ac_subst_vars | |
2126 | do | |
2127 | eval ac_val=\$$ac_var | |
2128 | case $ac_val in | |
2129 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2130 | esac | |
2131 | $as_echo "$ac_var='\''$ac_val'\''" | |
2132 | done | sort | |
2133 | echo | |
2134 | ||
2135 | if test -n "$ac_subst_files"; then | |
2136 | $as_echo "## ------------------- ## | |
2137 | ## File substitutions. ## | |
2138 | ## ------------------- ##" | |
2139 | echo | |
2140 | for ac_var in $ac_subst_files | |
2141 | do | |
2142 | eval ac_val=\$$ac_var | |
2143 | case $ac_val in | |
2144 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2145 | esac | |
2146 | $as_echo "$ac_var='\''$ac_val'\''" | |
2147 | done | sort | |
2148 | echo | |
2149 | fi | |
2150 | ||
2151 | if test -s confdefs.h; then | |
2152 | $as_echo "## ----------- ## | |
2153 | ## confdefs.h. ## | |
2154 | ## ----------- ##" | |
2155 | echo | |
2156 | cat confdefs.h | |
2157 | echo | |
2158 | fi | |
2159 | test "$ac_signal" != 0 && | |
2160 | $as_echo "$as_me: caught signal $ac_signal" | |
2161 | $as_echo "$as_me: exit $exit_status" | |
2162 | } >&5 | |
2163 | rm -f core *.core core.conftest.* && | |
2164 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2165 | exit $exit_status | |
2166 | ' 0 | |
2167 | for ac_signal in 1 2 13 15; do | |
2168 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2169 | done | |
2170 | ac_signal=0 | |
2171 | ||
2172 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2173 | rm -f -r conftest* confdefs.h | |
2174 | ||
2175 | $as_echo "/* confdefs.h */" > confdefs.h | |
2176 | ||
2177 | # Predefined preprocessor variables. | |
2178 | ||
2179 | cat >>confdefs.h <<_ACEOF | |
2180 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2181 | _ACEOF | |
2182 | ||
2183 | cat >>confdefs.h <<_ACEOF | |
2184 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2185 | _ACEOF | |
2186 | ||
2187 | cat >>confdefs.h <<_ACEOF | |
2188 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2189 | _ACEOF | |
2190 | ||
2191 | cat >>confdefs.h <<_ACEOF | |
2192 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2193 | _ACEOF | |
2194 | ||
2195 | cat >>confdefs.h <<_ACEOF | |
2196 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2197 | _ACEOF | |
2198 | ||
2199 | cat >>confdefs.h <<_ACEOF | |
2200 | #define PACKAGE_URL "$PACKAGE_URL" | |
2201 | _ACEOF | |
2202 | ||
2203 | ||
2204 | # Let the site file select an alternate cache file if it wants to. | |
2205 | # Prefer an explicitly selected file to automatically selected ones. | |
2206 | ac_site_file1=NONE | |
2207 | ac_site_file2=NONE | |
2208 | if test -n "$CONFIG_SITE"; then | |
2209 | # We do not want a PATH search for config.site. | |
2210 | case $CONFIG_SITE in #(( | |
2211 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2212 | */*) ac_site_file1=$CONFIG_SITE;; | |
2213 | *) ac_site_file1=./$CONFIG_SITE;; | |
2214 | esac | |
2215 | elif test "x$prefix" != xNONE; then | |
2216 | ac_site_file1=$prefix/share/config.site | |
2217 | ac_site_file2=$prefix/etc/config.site | |
2218 | else | |
2219 | ac_site_file1=$ac_default_prefix/share/config.site | |
2220 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2221 | fi | |
2222 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2223 | do | |
2224 | test "x$ac_site_file" = xNONE && continue | |
2225 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2226 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2227 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2228 | sed 's/^/| /' "$ac_site_file" >&5 | |
2229 | . "$ac_site_file" \ | |
2230 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2231 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2232 | as_fn_error $? "failed to load site script $ac_site_file | |
2233 | See \`config.log' for more details" "$LINENO" 5; } | |
2234 | fi | |
2235 | done | |
2236 | ||
2237 | if test -r "$cache_file"; then | |
2238 | # Some versions of bash will fail to source /dev/null (special files | |
2239 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2240 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2241 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2242 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2243 | case $cache_file in | |
2244 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2245 | *) . "./$cache_file";; | |
2246 | esac | |
2247 | fi | |
2248 | else | |
2249 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2250 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2251 | >$cache_file | |
2252 | fi | |
2253 | ||
2254 | # Check that the precious variables saved in the cache have kept the same | |
2255 | # value. | |
2256 | ac_cache_corrupted=false | |
2257 | for ac_var in $ac_precious_vars; do | |
2258 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2259 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2260 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2261 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2262 | case $ac_old_set,$ac_new_set in | |
2263 | set,) | |
2264 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2265 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2266 | ac_cache_corrupted=: ;; | |
2267 | ,set) | |
2268 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2269 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2270 | ac_cache_corrupted=: ;; | |
2271 | ,);; | |
2272 | *) | |
2273 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2274 | # differences in whitespace do not lead to failure. | |
2275 | ac_old_val_w=`echo x $ac_old_val` | |
2276 | ac_new_val_w=`echo x $ac_new_val` | |
2277 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2278 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2279 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2280 | ac_cache_corrupted=: | |
2281 | else | |
2282 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2283 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2284 | eval $ac_var=\$ac_old_val | |
2285 | fi | |
2286 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2287 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2288 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2289 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2290 | fi;; | |
2291 | esac | |
2292 | # Pass precious variables to config.status. | |
2293 | if test "$ac_new_set" = set; then | |
2294 | case $ac_new_val in | |
2295 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2296 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2297 | esac | |
2298 | case " $ac_configure_args " in | |
2299 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2300 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2301 | esac | |
2302 | fi | |
2303 | done | |
2304 | if $ac_cache_corrupted; then | |
2305 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2306 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2307 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2308 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2309 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2310 | fi | |
2311 | ## -------------------- ## | |
2312 | ## Main body of script. ## | |
2313 | ## -------------------- ## | |
2314 | ||
2315 | ac_ext=c | |
2316 | ac_cpp='$CPP $CPPFLAGS' | |
2317 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2318 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2319 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2320 | ||
2321 | ||
2322 | # For AX_EXTEND_SRCDIR | |
2323 | ac_aux_dir= | |
2324 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
2325 | if test -f "$ac_dir/install-sh"; then | |
2326 | ac_aux_dir=$ac_dir | |
2327 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2328 | break | |
2329 | elif test -f "$ac_dir/install.sh"; then | |
2330 | ac_aux_dir=$ac_dir | |
2331 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2332 | break | |
2333 | elif test -f "$ac_dir/shtool"; then | |
2334 | ac_aux_dir=$ac_dir | |
2335 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2336 | break | |
2337 | fi | |
2338 | done | |
2339 | if test -z "$ac_aux_dir"; then | |
2340 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
2341 | fi | |
2342 | ||
2343 | # These three variables are undocumented and unsupported, | |
2344 | # and are intended to be withdrawn in a future Autoconf release. | |
2345 | # They can cause serious problems if a builder's source tree is in a directory | |
2346 | # whose full name contains unusual characters. | |
2347 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2348 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2349 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
2350 | ||
2351 | ||
2352 | # Make sure we can run config.sub. | |
2353 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
2354 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
2355 | ||
2356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
2357 | $as_echo_n "checking build system type... " >&6; } | |
2358 | if ${ac_cv_build+:} false; then : | |
2359 | $as_echo_n "(cached) " >&6 | |
2360 | else | |
2361 | ac_build_alias=$build_alias | |
2362 | test "x$ac_build_alias" = x && | |
2363 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
2364 | test "x$ac_build_alias" = x && | |
2365 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
2366 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
2367 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
2368 | ||
2369 | fi | |
2370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
2371 | $as_echo "$ac_cv_build" >&6; } | |
2372 | case $ac_cv_build in | |
2373 | *-*-*) ;; | |
2374 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
2375 | esac | |
2376 | build=$ac_cv_build | |
2377 | ac_save_IFS=$IFS; IFS='-' | |
2378 | set x $ac_cv_build | |
2379 | shift | |
2380 | build_cpu=$1 | |
2381 | build_vendor=$2 | |
2382 | shift; shift | |
2383 | # Remember, the first character of IFS is used to create $*, | |
2384 | # except with old shells: | |
2385 | build_os=$* | |
2386 | IFS=$ac_save_IFS | |
2387 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
2388 | ||
2389 | ||
2390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
2391 | $as_echo_n "checking host system type... " >&6; } | |
2392 | if ${ac_cv_host+:} false; then : | |
2393 | $as_echo_n "(cached) " >&6 | |
2394 | else | |
2395 | if test "x$host_alias" = x; then | |
2396 | ac_cv_host=$ac_cv_build | |
2397 | else | |
2398 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2399 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
2400 | fi | |
2401 | ||
2402 | fi | |
2403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
2404 | $as_echo "$ac_cv_host" >&6; } | |
2405 | case $ac_cv_host in | |
2406 | *-*-*) ;; | |
2407 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
2408 | esac | |
2409 | host=$ac_cv_host | |
2410 | ac_save_IFS=$IFS; IFS='-' | |
2411 | set x $ac_cv_host | |
2412 | shift | |
2413 | host_cpu=$1 | |
2414 | host_vendor=$2 | |
2415 | shift; shift | |
2416 | # Remember, the first character of IFS is used to create $*, | |
2417 | # except with old shells: | |
2418 | host_os=$* | |
2419 | IFS=$ac_save_IFS | |
2420 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
2421 | ||
2422 | ||
2423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
2424 | $as_echo_n "checking target system type... " >&6; } | |
2425 | if ${ac_cv_target+:} false; then : | |
2426 | $as_echo_n "(cached) " >&6 | |
2427 | else | |
2428 | if test "x$target_alias" = x; then | |
2429 | ac_cv_target=$ac_cv_host | |
2430 | else | |
2431 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
2432 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
2433 | fi | |
2434 | ||
2435 | fi | |
2436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
2437 | $as_echo "$ac_cv_target" >&6; } | |
2438 | case $ac_cv_target in | |
2439 | *-*-*) ;; | |
2440 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; | |
2441 | esac | |
2442 | target=$ac_cv_target | |
2443 | ac_save_IFS=$IFS; IFS='-' | |
2444 | set x $ac_cv_target | |
2445 | shift | |
2446 | target_cpu=$1 | |
2447 | target_vendor=$2 | |
2448 | shift; shift | |
2449 | # Remember, the first character of IFS is used to create $*, | |
2450 | # except with old shells: | |
2451 | target_os=$* | |
2452 | IFS=$ac_save_IFS | |
2453 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
2454 | ||
2455 | ||
2456 | # The aliases save the names the user supplied, while $host etc. | |
2457 | # will get canonicalized. | |
2458 | test -n "$target_alias" && | |
2459 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
2460 | NONENONEs,x,x, && | |
2461 | program_prefix=${target_alias}- | |
2462 | ||
2463 | # [$]@ is unsable in 2.60+ but earlier autoconf had no ac_configure_args | |
2464 | if test "${ac_configure_args+set}" != "set" ; then | |
2465 | ac_configure_args= | |
2466 | for ac_arg in ${1+"$@"}; do | |
2467 | ac_configure_args="$ac_configure_args '$ac_arg'" | |
2468 | done | |
2469 | fi | |
2470 | ||
2471 | # Expand $ac_aux_dir to an absolute path. | |
2472 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
2473 | ||
2474 | ||
2475 | ax_enable_builddir="." | |
2476 | # Check whether --enable-builddir was given. | |
2477 | if test "${enable_builddir+set}" = set; then : | |
2478 | enableval=$enable_builddir; ax_enable_builddir="$enableval" | |
2479 | else | |
2480 | ax_enable_builddir="auto" | |
2481 | fi | |
2482 | ||
2483 | if test ".$ac_srcdir_defaulted" != ".no" ; then | |
2484 | if test ".$srcdir" = ".." ; then | |
2485 | if test -f config.status ; then | |
2486 | { $as_echo "$as_me:${as_lineno-$LINENO}: toplevel srcdir already configured... skipping subdir build" >&5 | |
2487 | $as_echo "$as_me: toplevel srcdir already configured... skipping subdir build" >&6;} | |
2488 | else | |
2489 | test ".$ax_enable_builddir" = "." && ax_enable_builddir="." | |
2490 | test ".$ax_enable_builddir" = ".no" && ax_enable_builddir="." | |
2491 | test ".$TARGET" = "." && TARGET="$target" | |
2492 | test ".$ax_enable_builddir" = ".auto" && ax_enable_builddir="$TARGET" | |
2493 | if test ".$ax_enable_builddir" != ".." ; then # we know where to go and | |
2494 | as_dir=$ax_enable_builddir; as_fn_mkdir_p | |
2495 | echo __.$ax_enable_builddir.__ > $ax_enable_builddir/conftest.tmp | |
2496 | cd $ax_enable_builddir | |
2497 | if grep __.$ax_enable_builddir.__ conftest.tmp >/dev/null 2>/dev/null ; then | |
2498 | rm conftest.tmp | |
2499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: continue configure in default builddir \"./$ax_enable_builddir\"" >&5 | |
2500 | $as_echo "continue configure in default builddir \"./$ax_enable_builddir\"" >&6; } | |
2501 | else | |
2502 | as_fn_error $? "could not change to default builddir \"./$ax_enable_builddir\"" "$LINENO" 5 | |
2503 | fi | |
2504 | srcdir=`echo "$ax_enable_builddir" | | |
2505 | sed -e 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g;s,[/]$,,;'` | |
2506 | # going to restart from subdirectory location | |
2507 | test -f $srcdir/config.log && mv $srcdir/config.log . | |
2508 | test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h . | |
2509 | test -f $srcdir/conftest.log && mv $srcdir/conftest.log . | |
2510 | test -f $srcdir/$cache_file && mv $srcdir/$cache_file . | |
2511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ....exec $SHELL $srcdir/$0 \"--srcdir=$srcdir\" \"--enable-builddir=$ax_enable_builddir\" ${1+\"$@\"}" >&5 | |
2512 | $as_echo "....exec $SHELL $srcdir/$0 \"--srcdir=$srcdir\" \"--enable-builddir=$ax_enable_builddir\" ${1+\"$@\"}" >&6; } | |
2513 | case "$0" in # restart | |
2514 | [\\/]* | ?:[\\/]*) # Asbolute name | |
2515 | eval $SHELL "'$0'" "'--srcdir=$srcdir'" "'--enable-builddir=$ax_enable_builddir'" $ac_configure_args ;; | |
2516 | *) eval $SHELL "'$srcdir/$0'" "'--srcdir=$srcdir'" "'--enable-builddir=$ax_enable_builddir'" $ac_configure_args ;; | |
2517 | esac ; exit $? | |
2518 | fi | |
2519 | fi | |
2520 | fi fi | |
2521 | test ".$ax_enable_builddir" = ".auto" && ax_enable_builddir="." | |
2522 | # Extract the first word of "gsed sed", so it can be a program name with args. | |
2523 | set dummy gsed sed; ac_word=$2 | |
2524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2525 | $as_echo_n "checking for $ac_word... " >&6; } | |
2526 | if ${ac_cv_path_ax_enable_builddir_sed+:} false; then : | |
2527 | $as_echo_n "(cached) " >&6 | |
2528 | else | |
2529 | case $ax_enable_builddir_sed in | |
2530 | [\\/]* | ?:[\\/]*) | |
2531 | ac_cv_path_ax_enable_builddir_sed="$ax_enable_builddir_sed" # Let the user override the test with a path. | |
2532 | ;; | |
2533 | *) | |
2534 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2535 | for as_dir in $PATH | |
2536 | do | |
2537 | IFS=$as_save_IFS | |
2538 | test -z "$as_dir" && as_dir=. | |
2539 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2540 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2541 | ac_cv_path_ax_enable_builddir_sed="$as_dir/$ac_word$ac_exec_ext" | |
2542 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2543 | break 2 | |
2544 | fi | |
2545 | done | |
2546 | done | |
2547 | IFS=$as_save_IFS | |
2548 | ||
2549 | test -z "$ac_cv_path_ax_enable_builddir_sed" && ac_cv_path_ax_enable_builddir_sed="sed" | |
2550 | ;; | |
2551 | esac | |
2552 | fi | |
2553 | ax_enable_builddir_sed=$ac_cv_path_ax_enable_builddir_sed | |
2554 | if test -n "$ax_enable_builddir_sed"; then | |
2555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_builddir_sed" >&5 | |
2556 | $as_echo "$ax_enable_builddir_sed" >&6; } | |
2557 | else | |
2558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2559 | $as_echo "no" >&6; } | |
2560 | fi | |
2561 | ||
2562 | ||
2563 | ax_enable_builddir_auxdir="$am_aux_dir" | |
2564 | ac_config_commands="$ac_config_commands buildir" | |
2565 | ||
2566 | am__api_version='1.16' | |
2567 | ||
2568 | # Find a good install program. We prefer a C program (faster), | |
2569 | # so one script is as good as another. But avoid the broken or | |
2570 | # incompatible versions: | |
2571 | # SysV /etc/install, /usr/sbin/install | |
2572 | # SunOS /usr/etc/install | |
2573 | # IRIX /sbin/install | |
2574 | # AIX /bin/install | |
2575 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
2576 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
2577 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2578 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2579 | # OS/2's system install, which has a completely different semantic | |
2580 | # ./install, which can be erroneously created by make from ./install.sh. | |
2581 | # Reject install programs that cannot install multiple files. | |
2582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
2583 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
2584 | if test -z "$INSTALL"; then | |
2585 | if ${ac_cv_path_install+:} false; then : | |
2586 | $as_echo_n "(cached) " >&6 | |
2587 | else | |
2588 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2589 | for as_dir in $PATH | |
2590 | do | |
2591 | IFS=$as_save_IFS | |
2592 | test -z "$as_dir" && as_dir=. | |
2593 | # Account for people who put trailing slashes in PATH elements. | |
2594 | case $as_dir/ in #(( | |
2595 | ./ | .// | /[cC]/* | \ | |
2596 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
2597 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
2598 | /usr/ucb/* ) ;; | |
2599 | *) | |
2600 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2601 | # Don't use installbsd from OSF since it installs stuff as root | |
2602 | # by default. | |
2603 | for ac_prog in ginstall scoinst install; do | |
2604 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2605 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | |
2606 | if test $ac_prog = install && | |
2607 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2608 | # AIX install. It has an incompatible calling convention. | |
2609 | : | |
2610 | elif test $ac_prog = install && | |
2611 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
2612 | # program-specific install script used by HP pwplus--don't use. | |
2613 | : | |
2614 | else | |
2615 | rm -rf conftest.one conftest.two conftest.dir | |
2616 | echo one > conftest.one | |
2617 | echo two > conftest.two | |
2618 | mkdir conftest.dir | |
2619 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
2620 | test -s conftest.one && test -s conftest.two && | |
2621 | test -s conftest.dir/conftest.one && | |
2622 | test -s conftest.dir/conftest.two | |
2623 | then | |
2624 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
2625 | break 3 | |
2626 | fi | |
2627 | fi | |
2628 | fi | |
2629 | done | |
2630 | done | |
2631 | ;; | |
2632 | esac | |
2633 | ||
2634 | done | |
2635 | IFS=$as_save_IFS | |
2636 | ||
2637 | rm -rf conftest.one conftest.two conftest.dir | |
2638 | ||
2639 | fi | |
2640 | if test "${ac_cv_path_install+set}" = set; then | |
2641 | INSTALL=$ac_cv_path_install | |
2642 | else | |
2643 | # As a last resort, use the slow shell script. Don't cache a | |
2644 | # value for INSTALL within a source directory, because that will | |
2645 | # break other packages using the cache if that directory is | |
2646 | # removed, or if the value is a relative name. | |
2647 | INSTALL=$ac_install_sh | |
2648 | fi | |
2649 | fi | |
2650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
2651 | $as_echo "$INSTALL" >&6; } | |
2652 | ||
2653 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2654 | # It thinks the first close brace ends the variable substitution. | |
2655 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2656 | ||
2657 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
2658 | ||
2659 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2660 | ||
2661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 | |
2662 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
2663 | # Reject unsafe characters in $srcdir or the absolute working directory | |
2664 | # name. Accept space and tab only in the latter. | |
2665 | am_lf=' | |
2666 | ' | |
2667 | case `pwd` in | |
2668 | *[\\\"\#\$\&\'\`$am_lf]*) | |
2669 | as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; | |
2670 | esac | |
2671 | case $srcdir in | |
2672 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
2673 | as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; | |
2674 | esac | |
2675 | ||
2676 | # Do 'set' in a subshell so we don't clobber the current shell's | |
2677 | # arguments. Must try -L first in case configure is actually a | |
2678 | # symlink; some systems play weird games with the mod time of symlinks | |
2679 | # (eg FreeBSD returns the mod time of the symlink's containing | |
2680 | # directory). | |
2681 | if ( | |
2682 | am_has_slept=no | |
2683 | for am_try in 1 2; do | |
2684 | echo "timestamp, slept: $am_has_slept" > conftest.file | |
2685 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
2686 | if test "$*" = "X"; then | |
2687 | # -L didn't work. | |
2688 | set X `ls -t "$srcdir/configure" conftest.file` | |
2689 | fi | |
2690 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
2691 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
2692 | ||
2693 | # If neither matched, then we have a broken ls. This can happen | |
2694 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
2695 | # broken ls alias from the environment. This has actually | |
2696 | # happened. Such a system could not be considered "sane". | |
2697 | as_fn_error $? "ls -t appears to fail. Make sure there is not a broken | |
2698 | alias in your environment" "$LINENO" 5 | |
2699 | fi | |
2700 | if test "$2" = conftest.file || test $am_try -eq 2; then | |
2701 | break | |
2702 | fi | |
2703 | # Just in case. | |
2704 | sleep 1 | |
2705 | am_has_slept=yes | |
2706 | done | |
2707 | test "$2" = conftest.file | |
2708 | ) | |
2709 | then | |
2710 | # Ok. | |
2711 | : | |
2712 | else | |
2713 | as_fn_error $? "newly created file is older than distributed files! | |
2714 | Check your system clock" "$LINENO" 5 | |
2715 | fi | |
2716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
2717 | $as_echo "yes" >&6; } | |
2718 | # If we didn't sleep, we still need to ensure time stamps of config.status and | |
2719 | # generated files are strictly newer. | |
2720 | am_sleep_pid= | |
2721 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
2722 | ( sleep 1 ) & | |
2723 | am_sleep_pid=$! | |
2724 | fi | |
2725 | ||
2726 | rm -f conftest.file | |
2727 | ||
2728 | test "$program_prefix" != NONE && | |
2729 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
2730 | # Use a double $ so make ignores it. | |
2731 | test "$program_suffix" != NONE && | |
2732 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
2733 | # Double any \ or $. | |
2734 | # By default was `s,x,x', remove it if useless. | |
2735 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
2736 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
2737 | ||
2738 | if test x"${MISSING+set}" != xset; then | |
2739 | case $am_aux_dir in | |
2740 | *\ * | *\ *) | |
2741 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2742 | *) | |
2743 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2744 | esac | |
2745 | fi | |
2746 | # Use eval to expand $SHELL | |
2747 | if eval "$MISSING --is-lightweight"; then | |
2748 | am_missing_run="$MISSING " | |
2749 | else | |
2750 | am_missing_run= | |
2751 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 | |
2752 | $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} | |
2753 | fi | |
2754 | ||
2755 | if test x"${install_sh+set}" != xset; then | |
2756 | case $am_aux_dir in | |
2757 | *\ * | *\ *) | |
2758 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
2759 | *) | |
2760 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
2761 | esac | |
2762 | fi | |
2763 | ||
2764 | # Installed binaries are usually stripped using 'strip' when the user | |
2765 | # run "make install-strip". However 'strip' might not be the right | |
2766 | # tool to use in cross-compilation environments, therefore Automake | |
2767 | # will honor the 'STRIP' environment variable to overrule this program. | |
2768 | if test "$cross_compiling" != no; then | |
2769 | if test -n "$ac_tool_prefix"; then | |
2770 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
2771 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
2772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2773 | $as_echo_n "checking for $ac_word... " >&6; } | |
2774 | if ${ac_cv_prog_STRIP+:} false; then : | |
2775 | $as_echo_n "(cached) " >&6 | |
2776 | else | |
2777 | if test -n "$STRIP"; then | |
2778 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2779 | else | |
2780 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2781 | for as_dir in $PATH | |
2782 | do | |
2783 | IFS=$as_save_IFS | |
2784 | test -z "$as_dir" && as_dir=. | |
2785 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2786 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2787 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
2788 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2789 | break 2 | |
2790 | fi | |
2791 | done | |
2792 | done | |
2793 | IFS=$as_save_IFS | |
2794 | ||
2795 | fi | |
2796 | fi | |
2797 | STRIP=$ac_cv_prog_STRIP | |
2798 | if test -n "$STRIP"; then | |
2799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
2800 | $as_echo "$STRIP" >&6; } | |
2801 | else | |
2802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2803 | $as_echo "no" >&6; } | |
2804 | fi | |
2805 | ||
2806 | ||
2807 | fi | |
2808 | if test -z "$ac_cv_prog_STRIP"; then | |
2809 | ac_ct_STRIP=$STRIP | |
2810 | # Extract the first word of "strip", so it can be a program name with args. | |
2811 | set dummy strip; ac_word=$2 | |
2812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2813 | $as_echo_n "checking for $ac_word... " >&6; } | |
2814 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : | |
2815 | $as_echo_n "(cached) " >&6 | |
2816 | else | |
2817 | if test -n "$ac_ct_STRIP"; then | |
2818 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
2819 | else | |
2820 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2821 | for as_dir in $PATH | |
2822 | do | |
2823 | IFS=$as_save_IFS | |
2824 | test -z "$as_dir" && as_dir=. | |
2825 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2826 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2827 | ac_cv_prog_ac_ct_STRIP="strip" | |
2828 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2829 | break 2 | |
2830 | fi | |
2831 | done | |
2832 | done | |
2833 | IFS=$as_save_IFS | |
2834 | ||
2835 | fi | |
2836 | fi | |
2837 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
2838 | if test -n "$ac_ct_STRIP"; then | |
2839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
2840 | $as_echo "$ac_ct_STRIP" >&6; } | |
2841 | else | |
2842 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2843 | $as_echo "no" >&6; } | |
2844 | fi | |
2845 | ||
2846 | if test "x$ac_ct_STRIP" = x; then | |
2847 | STRIP=":" | |
2848 | else | |
2849 | case $cross_compiling:$ac_tool_warned in | |
2850 | yes:) | |
2851 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2852 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2853 | ac_tool_warned=yes ;; | |
2854 | esac | |
2855 | STRIP=$ac_ct_STRIP | |
2856 | fi | |
2857 | else | |
2858 | STRIP="$ac_cv_prog_STRIP" | |
2859 | fi | |
2860 | ||
2861 | fi | |
2862 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
2863 | ||
2864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
2865 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
2866 | if test -z "$MKDIR_P"; then | |
2867 | if ${ac_cv_path_mkdir+:} false; then : | |
2868 | $as_echo_n "(cached) " >&6 | |
2869 | else | |
2870 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2871 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
2872 | do | |
2873 | IFS=$as_save_IFS | |
2874 | test -z "$as_dir" && as_dir=. | |
2875 | for ac_prog in mkdir gmkdir; do | |
2876 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2877 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue | |
2878 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
2879 | 'mkdir (GNU coreutils) '* | \ | |
2880 | 'mkdir (coreutils) '* | \ | |
2881 | 'mkdir (fileutils) '4.1*) | |
2882 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
2883 | break 3;; | |
2884 | esac | |
2885 | done | |
2886 | done | |
2887 | done | |
2888 | IFS=$as_save_IFS | |
2889 | ||
2890 | fi | |
2891 | ||
2892 | test -d ./--version && rmdir ./--version | |
2893 | if test "${ac_cv_path_mkdir+set}" = set; then | |
2894 | MKDIR_P="$ac_cv_path_mkdir -p" | |
2895 | else | |
2896 | # As a last resort, use the slow shell script. Don't cache a | |
2897 | # value for MKDIR_P within a source directory, because that will | |
2898 | # break other packages using the cache if that directory is | |
2899 | # removed, or if the value is a relative name. | |
2900 | MKDIR_P="$ac_install_sh -d" | |
2901 | fi | |
2902 | fi | |
2903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
2904 | $as_echo "$MKDIR_P" >&6; } | |
2905 | ||
2906 | for ac_prog in gawk mawk nawk awk | |
2907 | do | |
2908 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2909 | set dummy $ac_prog; ac_word=$2 | |
2910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2911 | $as_echo_n "checking for $ac_word... " >&6; } | |
2912 | if ${ac_cv_prog_AWK+:} false; then : | |
2913 | $as_echo_n "(cached) " >&6 | |
2914 | else | |
2915 | if test -n "$AWK"; then | |
2916 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2917 | else | |
2918 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2919 | for as_dir in $PATH | |
2920 | do | |
2921 | IFS=$as_save_IFS | |
2922 | test -z "$as_dir" && as_dir=. | |
2923 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2924 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2925 | ac_cv_prog_AWK="$ac_prog" | |
2926 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2927 | break 2 | |
2928 | fi | |
2929 | done | |
2930 | done | |
2931 | IFS=$as_save_IFS | |
2932 | ||
2933 | fi | |
2934 | fi | |
2935 | AWK=$ac_cv_prog_AWK | |
2936 | if test -n "$AWK"; then | |
2937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
2938 | $as_echo "$AWK" >&6; } | |
2939 | else | |
2940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2941 | $as_echo "no" >&6; } | |
2942 | fi | |
2943 | ||
2944 | ||
2945 | test -n "$AWK" && break | |
2946 | done | |
2947 | ||
2948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
2949 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
2950 | set x ${MAKE-make} | |
2951 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
2952 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : | |
2953 | $as_echo_n "(cached) " >&6 | |
2954 | else | |
2955 | cat >conftest.make <<\_ACEOF | |
2956 | SHELL = /bin/sh | |
2957 | all: | |
2958 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
2959 | _ACEOF | |
2960 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
2961 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
2962 | *@@@%%%=?*=@@@%%%*) | |
2963 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
2964 | *) | |
2965 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
2966 | esac | |
2967 | rm -f conftest.make | |
2968 | fi | |
2969 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
2970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
2971 | $as_echo "yes" >&6; } | |
2972 | SET_MAKE= | |
2973 | else | |
2974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2975 | $as_echo "no" >&6; } | |
2976 | SET_MAKE="MAKE=${MAKE-make}" | |
2977 | fi | |
2978 | ||
2979 | rm -rf .tst 2>/dev/null | |
2980 | mkdir .tst 2>/dev/null | |
2981 | if test -d .tst; then | |
2982 | am__leading_dot=. | |
2983 | else | |
2984 | am__leading_dot=_ | |
2985 | fi | |
2986 | rmdir .tst 2>/dev/null | |
2987 | ||
2988 | # Check whether --enable-silent-rules was given. | |
2989 | if test "${enable_silent_rules+set}" = set; then : | |
2990 | enableval=$enable_silent_rules; | |
2991 | fi | |
2992 | ||
2993 | case $enable_silent_rules in # ((( | |
2994 | yes) AM_DEFAULT_VERBOSITY=0;; | |
2995 | no) AM_DEFAULT_VERBOSITY=1;; | |
2996 | *) AM_DEFAULT_VERBOSITY=1;; | |
2997 | esac | |
2998 | am_make=${MAKE-make} | |
2999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
3000 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
3001 | if ${am_cv_make_support_nested_variables+:} false; then : | |
3002 | $as_echo_n "(cached) " >&6 | |
3003 | else | |
3004 | if $as_echo 'TRUE=$(BAR$(V)) | |
3005 | BAR0=false | |
3006 | BAR1=true | |
3007 | V=1 | |
3008 | am__doit: | |
3009 | @$(TRUE) | |
3010 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
3011 | am_cv_make_support_nested_variables=yes | |
3012 | else | |
3013 | am_cv_make_support_nested_variables=no | |
3014 | fi | |
3015 | fi | |
3016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
3017 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
3018 | if test $am_cv_make_support_nested_variables = yes; then | |
3019 | AM_V='$(V)' | |
3020 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
3021 | else | |
3022 | AM_V=$AM_DEFAULT_VERBOSITY | |
3023 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
3024 | fi | |
3025 | AM_BACKSLASH='\' | |
3026 | ||
3027 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
3028 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
3029 | # is not polluted with repeated "-I." | |
3030 | am__isrc=' -I$(srcdir)' | |
3031 | # test to see if srcdir already configured | |
3032 | if test -f $srcdir/config.status; then | |
3033 | as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
3034 | fi | |
3035 | fi | |
3036 | ||
3037 | # test whether we have cygpath | |
3038 | if test -z "$CYGPATH_W"; then | |
3039 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
3040 | CYGPATH_W='cygpath -w' | |
3041 | else | |
3042 | CYGPATH_W=echo | |
3043 | fi | |
3044 | fi | |
3045 | ||
3046 | ||
3047 | # Define the identity of the package. | |
3048 | PACKAGE='i3lock' | |
3049 | VERSION='2.13' | |
3050 | ||
3051 | ||
3052 | cat >>confdefs.h <<_ACEOF | |
3053 | #define PACKAGE "$PACKAGE" | |
3054 | _ACEOF | |
3055 | ||
3056 | ||
3057 | cat >>confdefs.h <<_ACEOF | |
3058 | #define VERSION "$VERSION" | |
3059 | _ACEOF | |
3060 | ||
3061 | # Some tools Automake needs. | |
3062 | ||
3063 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
3064 | ||
3065 | ||
3066 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
3067 | ||
3068 | ||
3069 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
3070 | ||
3071 | ||
3072 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
3073 | ||
3074 | ||
3075 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
3076 | ||
3077 | # For better backward compatibility. To be removed once Automake 1.9.x | |
3078 | # dies out for good. For more background, see: | |
3079 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
3080 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
3081 | mkdir_p='$(MKDIR_P)' | |
3082 | ||
3083 | # We need awk for the "check" target (and possibly the TAP driver). The | |
3084 | # system "awk" is bad on some platforms. | |
3085 | # Always define AMTAR for backward compatibility. Yes, it's still used | |
3086 | # in the wild :-( We should find a proper way to deprecate it ... | |
3087 | AMTAR='$${TAR-tar}' | |
3088 | ||
3089 | ||
3090 | # We'll loop over all known methods to create a tar archive until one works. | |
3091 | _am_tools='gnutar pax cpio none' | |
3092 | ||
3093 | am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' | |
3094 | ||
3095 | ||
3096 | ||
3097 | ||
3098 | ||
3099 | ||
3100 | # POSIX will say in a future version that running "rm -f" with no argument | |
3101 | # is OK; and we want to be able to make that assumption in our Makefile | |
3102 | # recipes. So use an aggressive probe to check that the usage we want is | |
3103 | # actually supported "in the wild" to an acceptable degree. | |
3104 | # See automake bug#10828. | |
3105 | # To make any issue more visible, cause the running configure to be aborted | |
3106 | # by default if the 'rm' program in use doesn't match our expectations; the | |
3107 | # user can still override this though. | |
3108 | if rm -f && rm -fr && rm -rf; then : OK; else | |
3109 | cat >&2 <<'END' | |
3110 | Oops! | |
3111 | ||
3112 | Your 'rm' program seems unable to run without file operands specified | |
3113 | on the command line, even when the '-f' option is present. This is contrary | |
3114 | to the behaviour of most rm programs out there, and not conforming with | |
3115 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
3116 | ||
3117 | Please tell bug-automake@gnu.org about your system, including the value | |
3118 | of your $PATH and any error possibly output before this message. This | |
3119 | can help us improve future automake versions. | |
3120 | ||
3121 | END | |
3122 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
3123 | echo 'Configuration will proceed anyway, since you have set the' >&2 | |
3124 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
3125 | echo >&2 | |
3126 | else | |
3127 | cat >&2 <<'END' | |
3128 | Aborting the configuration process, to ensure you take notice of the issue. | |
3129 | ||
3130 | You can download and install GNU coreutils to get an 'rm' implementation | |
3131 | that behaves properly: <https://www.gnu.org/software/coreutils/>. | |
3132 | ||
3133 | If you want to complete the configuration process using your problematic | |
3134 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
3135 | to "yes", and re-run configure. | |
3136 | ||
3137 | END | |
3138 | as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 | |
3139 | fi | |
3140 | fi | |
3141 | ||
3142 | # Default to silent rules, use V=1 to get verbose compilation output. | |
3143 | # Check whether --enable-silent-rules was given. | |
3144 | if test "${enable_silent_rules+set}" = set; then : | |
3145 | enableval=$enable_silent_rules; | |
3146 | fi | |
3147 | ||
3148 | case $enable_silent_rules in # ((( | |
3149 | yes) AM_DEFAULT_VERBOSITY=0;; | |
3150 | no) AM_DEFAULT_VERBOSITY=1;; | |
3151 | *) AM_DEFAULT_VERBOSITY=0;; | |
3152 | esac | |
3153 | am_make=${MAKE-make} | |
3154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 | |
3155 | $as_echo_n "checking whether $am_make supports nested variables... " >&6; } | |
3156 | if ${am_cv_make_support_nested_variables+:} false; then : | |
3157 | $as_echo_n "(cached) " >&6 | |
3158 | else | |
3159 | if $as_echo 'TRUE=$(BAR$(V)) | |
3160 | BAR0=false | |
3161 | BAR1=true | |
3162 | V=1 | |
3163 | am__doit: | |
3164 | @$(TRUE) | |
3165 | .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then | |
3166 | am_cv_make_support_nested_variables=yes | |
3167 | else | |
3168 | am_cv_make_support_nested_variables=no | |
3169 | fi | |
3170 | fi | |
3171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 | |
3172 | $as_echo "$am_cv_make_support_nested_variables" >&6; } | |
3173 | if test $am_cv_make_support_nested_variables = yes; then | |
3174 | AM_V='$(V)' | |
3175 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
3176 | else | |
3177 | AM_V=$AM_DEFAULT_VERBOSITY | |
3178 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
3179 | fi | |
3180 | AM_BACKSLASH='\' | |
3181 | ||
3182 | # Make it possible to disable maintainer mode to disable re-generation of build | |
3183 | # system files. | |
3184 | ||
3185 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
3186 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
3187 | # Check whether --enable-maintainer-mode was given. | |
3188 | if test "${enable_maintainer_mode+set}" = set; then : | |
3189 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3190 | else | |
3191 | USE_MAINTAINER_MODE=yes | |
3192 | fi | |
3193 | ||
3194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3195 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3196 | if test $USE_MAINTAINER_MODE = yes; then | |
3197 | MAINTAINER_MODE_TRUE= | |
3198 | MAINTAINER_MODE_FALSE='#' | |
3199 | else | |
3200 | MAINTAINER_MODE_TRUE='#' | |
3201 | MAINTAINER_MODE_FALSE= | |
3202 | fi | |
3203 | ||
3204 | MAINT=$MAINTAINER_MODE_TRUE | |
3205 | ||
3206 | ||
3207 | ||
3208 | ac_config_headers="$ac_config_headers config.h" | |
3209 | ||
3210 | ||
3211 | ||
3212 | ||
3213 | ||
3214 | # Verify we are using GNU make because we use '%'-style pattern rules in | |
3215 | # Makefile.am, which are a GNU make extension. Pull requests to replace | |
3216 | # '%'-style pattern rules with a more portable alternative are welcome. | |
3217 | for ac_prog in gawk mawk nawk awk | |
3218 | do | |
3219 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3220 | set dummy $ac_prog; ac_word=$2 | |
3221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3222 | $as_echo_n "checking for $ac_word... " >&6; } | |
3223 | if ${ac_cv_prog_AWK+:} false; then : | |
3224 | $as_echo_n "(cached) " >&6 | |
3225 | else | |
3226 | if test -n "$AWK"; then | |
3227 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
3228 | else | |
3229 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3230 | for as_dir in $PATH | |
3231 | do | |
3232 | IFS=$as_save_IFS | |
3233 | test -z "$as_dir" && as_dir=. | |
3234 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3235 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3236 | ac_cv_prog_AWK="$ac_prog" | |
3237 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3238 | break 2 | |
3239 | fi | |
3240 | done | |
3241 | done | |
3242 | IFS=$as_save_IFS | |
3243 | ||
3244 | fi | |
3245 | fi | |
3246 | AWK=$ac_cv_prog_AWK | |
3247 | if test -n "$AWK"; then | |
3248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
3249 | $as_echo "$AWK" >&6; } | |
3250 | else | |
3251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3252 | $as_echo "no" >&6; } | |
3253 | fi | |
3254 | ||
3255 | ||
3256 | test -n "$AWK" && break | |
3257 | done | |
3258 | ||
3259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 | |
3260 | $as_echo_n "checking for GNU make... " >&6; } | |
3261 | if ${_cv_gnu_make_command+:} false; then : | |
3262 | $as_echo_n "(cached) " >&6 | |
3263 | else | |
3264 | _cv_gnu_make_command="" ; | |
3265 | for a in "$MAKE" make gmake gnumake ; do | |
3266 | if test -z "$a" ; then continue ; fi ; | |
3267 | if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then | |
3268 | _cv_gnu_make_command=$a ; | |
3269 | AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make") | |
3270 | ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }') | |
3271 | break ; | |
3272 | fi | |
3273 | done ; | |
3274 | fi | |
3275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 | |
3276 | $as_echo "$_cv_gnu_make_command" >&6; } | |
3277 | if test "x$_cv_gnu_make_command" = x""; then : | |
3278 | ifGNUmake="#" | |
3279 | else | |
3280 | ifGNUmake="" | |
3281 | fi | |
3282 | if test "x$_cv_gnu_make_command" = x""; then : | |
3283 | { ax_cv_gnu_make_command=; unset ax_cv_gnu_make_command;} | |
3284 | else | |
3285 | ax_cv_gnu_make_command=${_cv_gnu_make_command} | |
3286 | fi | |
3287 | ||
3288 | ||
3289 | if test "x$_cv_gnu_make_command" = x""; then : | |
3290 | as_fn_error $? "the i3lock Makefile.am requires GNU make" "$LINENO" 5 | |
3291 | fi | |
3292 | ||
3293 | case $srcdir in #( | |
3294 | .|.*|/*) : | |
3295 | ||
3296 | # pwd -P is specified in IEEE 1003.1 from 2004 | |
3297 | as_dir=`cd "$srcdir" && pwd -P` | |
3298 | as_base=`$as_basename -- $as_dir || | |
3299 | $as_expr X/$as_dir : '.*/\([^/][^/]*\)/*$' \| \ | |
3300 | X$as_dir : 'X\(//\)$' \| \ | |
3301 | X$as_dir : 'X\(/\)' \| . 2>/dev/null || | |
3302 | $as_echo X/$as_dir | | |
3303 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
3304 | s//\1/ | |
3305 | q | |
3306 | } | |
3307 | /^X\/\(\/\/\)$/{ | |
3308 | s//\1/ | |
3309 | q | |
3310 | } | |
3311 | /^X\/\(\/\).*/{ | |
3312 | s//\1/ | |
3313 | q | |
3314 | } | |
3315 | s/.*/./; q'` | |
3316 | srcdir=${srcdir}/../${as_base} | |
3317 | ||
3318 | AX_EXTEND_SRCDIR_CPPFLAGS="-DSTRIPPED__FILE__=\\\"\$\$(basename \$<)\\\"" | |
3319 | ||
3320 | ;; #( | |
3321 | *) : | |
3322 | ;; | |
3323 | esac | |
3324 | ||
3325 | ||
3326 | if test -d ${srcdir}/.git; then : | |
3327 | ||
3328 | VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)" | |
3329 | I3LOCK_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} log --pretty=format:%cd --date=short -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")" | |
3330 | # Mirrors what libi3/is_debug_build.c does: | |
3331 | is_release=$(test $(echo "${I3LOCK_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no) | |
3332 | ||
3333 | else | |
3334 | ||
3335 | VERSION="$(cut -d '-' -f 1 ${srcdir}/I3LOCK_VERSION | cut -d ' ' -f 1)" | |
3336 | I3LOCK_VERSION="$(sed -e 's/[\"?\\]/\\&/g' ${srcdir}/I3LOCK_VERSION)" | |
3337 | is_release="$(grep -q non-git ${srcdir}/I3LOCK_VERSION && echo no || echo yes)" | |
3338 | ||
3339 | fi | |
3340 | I3LOCK_VERSION=$I3LOCK_VERSION | |
3341 | ||
3342 | ||
3343 | cat >>confdefs.h <<_ACEOF | |
3344 | #define I3LOCK_VERSION "${I3LOCK_VERSION}" | |
3345 | _ACEOF | |
3346 | ||
3347 | ||
3348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
3349 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
3350 | if ${ac_cv_path_SED+:} false; then : | |
3351 | $as_echo_n "(cached) " >&6 | |
3352 | else | |
3353 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
3354 | for ac_i in 1 2 3 4 5 6 7; do | |
3355 | ac_script="$ac_script$as_nl$ac_script" | |
3356 | done | |
3357 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
3358 | { ac_script=; unset ac_script;} | |
3359 | if test -z "$SED"; then | |
3360 | ac_path_SED_found=false | |
3361 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3362 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3363 | for as_dir in $PATH | |
3364 | do | |
3365 | IFS=$as_save_IFS | |
3366 | test -z "$as_dir" && as_dir=. | |
3367 | for ac_prog in sed gsed; do | |
3368 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3369 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
3370 | as_fn_executable_p "$ac_path_SED" || continue | |
3371 | # Check for GNU ac_path_SED and select it if it is found. | |
3372 | # Check for GNU $ac_path_SED | |
3373 | case `"$ac_path_SED" --version 2>&1` in | |
3374 | *GNU*) | |
3375 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
3376 | *) | |
3377 | ac_count=0 | |
3378 | $as_echo_n 0123456789 >"conftest.in" | |
3379 | while : | |
3380 | do | |
3381 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3382 | mv "conftest.tmp" "conftest.in" | |
3383 | cp "conftest.in" "conftest.nl" | |
3384 | $as_echo '' >> "conftest.nl" | |
3385 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3386 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3387 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3388 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
3389 | # Best one so far, save it but keep looking for a better one | |
3390 | ac_cv_path_SED="$ac_path_SED" | |
3391 | ac_path_SED_max=$ac_count | |
3392 | fi | |
3393 | # 10*(2^10) chars as input seems more than enough | |
3394 | test $ac_count -gt 10 && break | |
3395 | done | |
3396 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3397 | esac | |
3398 | ||
3399 | $ac_path_SED_found && break 3 | |
3400 | done | |
3401 | done | |
3402 | done | |
3403 | IFS=$as_save_IFS | |
3404 | if test -z "$ac_cv_path_SED"; then | |
3405 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
3406 | fi | |
3407 | else | |
3408 | ac_cv_path_SED=$SED | |
3409 | fi | |
3410 | ||
3411 | fi | |
3412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
3413 | $as_echo "$ac_cv_path_SED" >&6; } | |
3414 | SED="$ac_cv_path_SED" | |
3415 | rm -f conftest.sed | |
3416 | ||
3417 | ||
3418 | ||
3419 | ||
3420 | # allow to override gcov location | |
3421 | ||
3422 | # Check whether --with-gcov was given. | |
3423 | if test "${with_gcov+set}" = set; then : | |
3424 | withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov | |
3425 | else | |
3426 | _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov | |
3427 | fi | |
3428 | ||
3429 | ||
3430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 | |
3431 | $as_echo_n "checking whether to build with code coverage support... " >&6; } | |
3432 | # Check whether --enable-code-coverage was given. | |
3433 | if test "${enable_code_coverage+set}" = set; then : | |
3434 | enableval=$enable_code_coverage; | |
3435 | else | |
3436 | enable_code_coverage=no | |
3437 | fi | |
3438 | ||
3439 | ||
3440 | if test x$enable_code_coverage = xyes; then | |
3441 | CODE_COVERAGE_ENABLED_TRUE= | |
3442 | CODE_COVERAGE_ENABLED_FALSE='#' | |
3443 | else | |
3444 | CODE_COVERAGE_ENABLED_TRUE='#' | |
3445 | CODE_COVERAGE_ENABLED_FALSE= | |
3446 | fi | |
3447 | ||
3448 | CODE_COVERAGE_ENABLED=$enable_code_coverage | |
3449 | ||
3450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 | |
3451 | $as_echo "$enable_code_coverage" >&6; } | |
3452 | ||
3453 | if test "$enable_code_coverage" = "yes" ; then : | |
3454 | ||
3455 | # check for gcov | |
3456 | if test -n "$ac_tool_prefix"; then | |
3457 | # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. | |
3458 | set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 | |
3459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3460 | $as_echo_n "checking for $ac_word... " >&6; } | |
3461 | if ${ac_cv_prog_GCOV+:} false; then : | |
3462 | $as_echo_n "(cached) " >&6 | |
3463 | else | |
3464 | if test -n "$GCOV"; then | |
3465 | ac_cv_prog_GCOV="$GCOV" # Let the user override the test. | |
3466 | else | |
3467 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3468 | for as_dir in $PATH | |
3469 | do | |
3470 | IFS=$as_save_IFS | |
3471 | test -z "$as_dir" && as_dir=. | |
3472 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3473 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3474 | ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" | |
3475 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3476 | break 2 | |
3477 | fi | |
3478 | done | |
3479 | done | |
3480 | IFS=$as_save_IFS | |
3481 | ||
3482 | fi | |
3483 | fi | |
3484 | GCOV=$ac_cv_prog_GCOV | |
3485 | if test -n "$GCOV"; then | |
3486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 | |
3487 | $as_echo "$GCOV" >&6; } | |
3488 | else | |
3489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3490 | $as_echo "no" >&6; } | |
3491 | fi | |
3492 | ||
3493 | ||
3494 | fi | |
3495 | if test -z "$ac_cv_prog_GCOV"; then | |
3496 | ac_ct_GCOV=$GCOV | |
3497 | # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. | |
3498 | set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 | |
3499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3500 | $as_echo_n "checking for $ac_word... " >&6; } | |
3501 | if ${ac_cv_prog_ac_ct_GCOV+:} false; then : | |
3502 | $as_echo_n "(cached) " >&6 | |
3503 | else | |
3504 | if test -n "$ac_ct_GCOV"; then | |
3505 | ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. | |
3506 | else | |
3507 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3508 | for as_dir in $PATH | |
3509 | do | |
3510 | IFS=$as_save_IFS | |
3511 | test -z "$as_dir" && as_dir=. | |
3512 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3513 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3514 | ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" | |
3515 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3516 | break 2 | |
3517 | fi | |
3518 | done | |
3519 | done | |
3520 | IFS=$as_save_IFS | |
3521 | ||
3522 | fi | |
3523 | fi | |
3524 | ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV | |
3525 | if test -n "$ac_ct_GCOV"; then | |
3526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 | |
3527 | $as_echo "$ac_ct_GCOV" >&6; } | |
3528 | else | |
3529 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3530 | $as_echo "no" >&6; } | |
3531 | fi | |
3532 | ||
3533 | if test "x$ac_ct_GCOV" = x; then | |
3534 | GCOV=":" | |
3535 | else | |
3536 | case $cross_compiling:$ac_tool_warned in | |
3537 | yes:) | |
3538 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3539 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3540 | ac_tool_warned=yes ;; | |
3541 | esac | |
3542 | GCOV=$ac_ct_GCOV | |
3543 | fi | |
3544 | else | |
3545 | GCOV="$ac_cv_prog_GCOV" | |
3546 | fi | |
3547 | ||
3548 | if test "X$GCOV" = "X:"; then : | |
3549 | as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 | |
3550 | fi | |
3551 | ||
3552 | ||
3553 | if test "$GCC" = "no" ; then : | |
3554 | ||
3555 | as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 | |
3556 | ||
3557 | fi | |
3558 | ||
3559 | # List of supported lcov versions. | |
3560 | lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" | |
3561 | ||
3562 | # Extract the first word of "lcov", so it can be a program name with args. | |
3563 | set dummy lcov; ac_word=$2 | |
3564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3565 | $as_echo_n "checking for $ac_word... " >&6; } | |
3566 | if ${ac_cv_prog_LCOV+:} false; then : | |
3567 | $as_echo_n "(cached) " >&6 | |
3568 | else | |
3569 | if test -n "$LCOV"; then | |
3570 | ac_cv_prog_LCOV="$LCOV" # Let the user override the test. | |
3571 | else | |
3572 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3573 | for as_dir in $PATH | |
3574 | do | |
3575 | IFS=$as_save_IFS | |
3576 | test -z "$as_dir" && as_dir=. | |
3577 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3578 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3579 | ac_cv_prog_LCOV="lcov" | |
3580 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3581 | break 2 | |
3582 | fi | |
3583 | done | |
3584 | done | |
3585 | IFS=$as_save_IFS | |
3586 | ||
3587 | fi | |
3588 | fi | |
3589 | LCOV=$ac_cv_prog_LCOV | |
3590 | if test -n "$LCOV"; then | |
3591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 | |
3592 | $as_echo "$LCOV" >&6; } | |
3593 | else | |
3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3595 | $as_echo "no" >&6; } | |
3596 | fi | |
3597 | ||
3598 | ||
3599 | # Extract the first word of "genhtml", so it can be a program name with args. | |
3600 | set dummy genhtml; ac_word=$2 | |
3601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3602 | $as_echo_n "checking for $ac_word... " >&6; } | |
3603 | if ${ac_cv_prog_GENHTML+:} false; then : | |
3604 | $as_echo_n "(cached) " >&6 | |
3605 | else | |
3606 | if test -n "$GENHTML"; then | |
3607 | ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. | |
3608 | else | |
3609 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3610 | for as_dir in $PATH | |
3611 | do | |
3612 | IFS=$as_save_IFS | |
3613 | test -z "$as_dir" && as_dir=. | |
3614 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3615 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3616 | ac_cv_prog_GENHTML="genhtml" | |
3617 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3618 | break 2 | |
3619 | fi | |
3620 | done | |
3621 | done | |
3622 | IFS=$as_save_IFS | |
3623 | ||
3624 | fi | |
3625 | fi | |
3626 | GENHTML=$ac_cv_prog_GENHTML | |
3627 | if test -n "$GENHTML"; then | |
3628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 | |
3629 | $as_echo "$GENHTML" >&6; } | |
3630 | else | |
3631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3632 | $as_echo "no" >&6; } | |
3633 | fi | |
3634 | ||
3635 | ||
3636 | ||
3637 | if test "$LCOV" ; then : | |
3638 | ||
3639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 | |
3640 | $as_echo_n "checking for lcov version... " >&6; } | |
3641 | if ${ax_cv_lcov_version+:} false; then : | |
3642 | $as_echo_n "(cached) " >&6 | |
3643 | else | |
3644 | ||
3645 | ax_cv_lcov_version=invalid | |
3646 | lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` | |
3647 | for lcov_check_version in $lcov_version_list; do | |
3648 | if test "$lcov_version" = "$lcov_check_version"; then | |
3649 | ax_cv_lcov_version="$lcov_check_version (ok)" | |
3650 | fi | |
3651 | done | |
3652 | ||
3653 | fi | |
3654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 | |
3655 | $as_echo "$ax_cv_lcov_version" >&6; } | |
3656 | ||
3657 | else | |
3658 | ||
3659 | lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" | |
3660 | as_fn_error $? "$lcov_msg" "$LINENO" 5 | |
3661 | ||
3662 | fi | |
3663 | ||
3664 | case $ax_cv_lcov_version in | |
3665 | ""|invalid) | |
3666 | lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." | |
3667 | as_fn_error $? "$lcov_msg" "$LINENO" 5 | |
3668 | LCOV="exit 0;" | |
3669 | ;; | |
3670 | esac | |
3671 | ||
3672 | if test -z "$GENHTML" ; then : | |
3673 | ||
3674 | as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 | |
3675 | ||
3676 | fi | |
3677 | ||
3678 | CODE_COVERAGE_CPPFLAGS="-DNDEBUG" | |
3679 | CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" | |
3680 | CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" | |
3681 | CODE_COVERAGE_LDFLAGS="-lgcov" | |
3682 | ||
3683 | ||
3684 | ||
3685 | ||
3686 | ||
3687 | ||
3688 | fi | |
3689 | ||
3690 | CODE_COVERAGE_RULES=' | |
3691 | # Code coverage | |
3692 | # | |
3693 | # Optional: | |
3694 | # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. | |
3695 | # Multiple directories may be specified, separated by whitespace. | |
3696 | # (Default: $(top_builddir)) | |
3697 | # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated | |
3698 | # by lcov for code coverage. (Default: | |
3699 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) | |
3700 | # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage | |
3701 | # reports to be created. (Default: | |
3702 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) | |
3703 | # - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, | |
3704 | # set to 0 to disable it and leave empty to stay with the default. | |
3705 | # (Default: empty) | |
3706 | # - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov | |
3707 | # instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) | |
3708 | # - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov | |
3709 | # instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) | |
3710 | # - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov | |
3711 | # - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the | |
3712 | # collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) | |
3713 | # - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov | |
3714 | # instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) | |
3715 | # - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering | |
3716 | # lcov instance. (Default: empty) | |
3717 | # - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov | |
3718 | # instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) | |
3719 | # - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the | |
3720 | # genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) | |
3721 | # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml | |
3722 | # instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) | |
3723 | # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore | |
3724 | # | |
3725 | # The generated report will be titled using the $(PACKAGE_NAME) and | |
3726 | # $(PACKAGE_VERSION). In order to add the current git hash to the title, | |
3727 | # use the git-version-gen script, available online. | |
3728 | ||
3729 | # Optional variables | |
3730 | CODE_COVERAGE_DIRECTORY ?= $(top_builddir) | |
3731 | CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info | |
3732 | CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage | |
3733 | CODE_COVERAGE_BRANCH_COVERAGE ?= | |
3734 | CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ | |
3735 | --rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) | |
3736 | CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) | |
3737 | CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" | |
3738 | CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) | |
3739 | CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) | |
3740 | CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= | |
3741 | CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) | |
3742 | CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ | |
3743 | $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ | |
3744 | --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) | |
3745 | CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) | |
3746 | CODE_COVERAGE_IGNORE_PATTERN ?= | |
3747 | ||
3748 | code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) | |
3749 | code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) | |
3750 | code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ | |
3751 | $(CODE_COVERAGE_OUTPUT_FILE); | |
3752 | code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) | |
3753 | code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) | |
3754 | code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ | |
3755 | $(CODE_COVERAGE_IGNORE_PATTERN); | |
3756 | code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) | |
3757 | code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) | |
3758 | code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); | |
3759 | code_coverage_quiet = $(code_coverage_quiet_$(V)) | |
3760 | code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) | |
3761 | code_coverage_quiet_0 = --quiet | |
3762 | ||
3763 | # sanitizes the test-name: replaces with underscores: dashes and dots | |
3764 | code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) | |
3765 | ||
3766 | # Use recursive makes in order to ignore errors during check | |
3767 | check-code-coverage: | |
3768 | ifeq ($(CODE_COVERAGE_ENABLED),yes) | |
3769 | -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check | |
3770 | $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture | |
3771 | else | |
3772 | @echo "Need to reconfigure with --enable-code-coverage" | |
3773 | endif | |
3774 | ||
3775 | # Capture code coverage data | |
3776 | code-coverage-capture: code-coverage-capture-hook | |
3777 | ifeq ($(CODE_COVERAGE_ENABLED),yes) | |
3778 | $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) | |
3779 | $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) | |
3780 | -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp | |
3781 | $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) | |
3782 | @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" | |
3783 | else | |
3784 | @echo "Need to reconfigure with --enable-code-coverage" | |
3785 | endif | |
3786 | ||
3787 | # Hook rule executed before code-coverage-capture, overridable by the user | |
3788 | code-coverage-capture-hook: | |
3789 | ||
3790 | ifeq ($(CODE_COVERAGE_ENABLED),yes) | |
3791 | clean: code-coverage-clean | |
3792 | code-coverage-clean: | |
3793 | -$(LCOV) --directory $(top_builddir) -z | |
3794 | -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) | |
3795 | -find . -name "*.gcda" -o -name "*.gcov" -delete | |
3796 | endif | |
3797 | ||
3798 | GITIGNOREFILES ?= | |
3799 | GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) | |
3800 | ||
3801 | A''M_DISTCHECK_CONFIGURE_FLAGS ?= | |
3802 | A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage | |
3803 | ||
3804 | .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean | |
3805 | ' | |
3806 | ||
3807 | ||
3808 | ||
3809 | ||
3810 | ||
3811 | ||
3812 | ||
3813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5 | |
3814 | $as_echo_n "checking whether to enable debugging... " >&6; } | |
3815 | ||
3816 | ax_enable_debug_default=yes | |
3817 | ax_enable_debug_is_release=$is_release | |
3818 | ||
3819 | # If this is a release, override the default. | |
3820 | if test "$ax_enable_debug_is_release" = "yes"; then : | |
3821 | ax_enable_debug_default="no" | |
3822 | fi | |
3823 | ||
3824 | ||
3825 | ||
3826 | ||
3827 | # Check whether --enable-debug was given. | |
3828 | if test "${enable_debug+set}" = set; then : | |
3829 | enableval=$enable_debug; | |
3830 | else | |
3831 | enable_debug=$ax_enable_debug_default | |
3832 | fi | |
3833 | ||
3834 | ||
3835 | # empty mean debug yes | |
3836 | if test "x$enable_debug" = "x"; then : | |
3837 | enable_debug="yes" | |
3838 | fi | |
3839 | ||
3840 | # case of debug | |
3841 | case $enable_debug in #( | |
3842 | yes) : | |
3843 | ||
3844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3845 | $as_echo "yes" >&6; } | |
3846 | CFLAGS="${CFLAGS} -g -O0" | |
3847 | CXXFLAGS="${CXXFLAGS} -g -O0" | |
3848 | FFLAGS="${FFLAGS} -g -O0" | |
3849 | FCFLAGS="${FCFLAGS} -g -O0" | |
3850 | OBJCFLAGS="${OBJCFLAGS} -g -O0" | |
3851 | ;; #( | |
3852 | info) : | |
3853 | ||
3854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: info" >&5 | |
3855 | $as_echo "info" >&6; } | |
3856 | CFLAGS="${CFLAGS} -g" | |
3857 | CXXFLAGS="${CXXFLAGS} -g" | |
3858 | FFLAGS="${FFLAGS} -g" | |
3859 | FCFLAGS="${FCFLAGS} -g" | |
3860 | OBJCFLAGS="${OBJCFLAGS} -g" | |
3861 | ;; #( | |
3862 | profile) : | |
3863 | ||
3864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5 | |
3865 | $as_echo "profile" >&6; } | |
3866 | CFLAGS="${CFLAGS} -g -pg" | |
3867 | CXXFLAGS="${CXXFLAGS} -g -pg" | |
3868 | FFLAGS="${FFLAGS} -g -pg" | |
3869 | FCFLAGS="${FCFLAGS} -g -pg" | |
3870 | OBJCFLAGS="${OBJCFLAGS} -g -pg" | |
3871 | LDFLAGS="${LDFLAGS} -pg" | |
3872 | ;; #( | |
3873 | *) : | |
3874 | ||
3875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3876 | $as_echo "no" >&6; } | |
3877 | if test "x${CFLAGS+set}" != "xset"; then : | |
3878 | CFLAGS="" | |
3879 | fi | |
3880 | if test "x${CXXFLAGS+set}" != "xset"; then : | |
3881 | CXXFLAGS="" | |
3882 | fi | |
3883 | if test "x${FFLAGS+set}" != "xset"; then : | |
3884 | FFLAGS="" | |
3885 | fi | |
3886 | if test "x${FCFLAGS+set}" != "xset"; then : | |
3887 | FCFLAGS="" | |
3888 | fi | |
3889 | if test "x${OBJCFLAGS+set}" != "xset"; then : | |
3890 | OBJCFLAGS="" | |
3891 | fi | |
3892 | ;; | |
3893 | esac | |
3894 | ||
3895 | if test "x$enable_debug" = "xyes"; then : | |
3896 | ||
3897 | else | |
3898 | ||
3899 | $as_echo "#define UNUSED_NDEBUG /**/" >>confdefs.h | |
3900 | ||
3901 | fi | |
3902 | ax_enable_debug=$enable_debug | |
3903 | ||
3904 | ||
3905 | DEPDIR="${am__leading_dot}deps" | |
3906 | ||
3907 | ac_config_commands="$ac_config_commands depfiles" | |
3908 | ||
3909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 | |
3910 | $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } | |
3911 | cat > confinc.mk << 'END' | |
3912 | am__doit: | |
3913 | @echo this is the am__doit target >confinc.out | |
3914 | .PHONY: am__doit | |
3915 | END | |
3916 | am__include="#" | |
3917 | am__quote= | |
3918 | # BSD make does it like this. | |
3919 | echo '.include "confinc.mk" # ignored' > confmf.BSD | |
3920 | # Other make implementations (GNU, Solaris 10, AIX) do it like this. | |
3921 | echo 'include confinc.mk # ignored' > confmf.GNU | |
3922 | _am_result=no | |
3923 | for s in GNU BSD; do | |
3924 | { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 | |
3925 | (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 | |
3926 | ac_status=$? | |
3927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3928 | (exit $ac_status); } | |
3929 | case $?:`cat confinc.out 2>/dev/null` in #( | |
3930 | '0:this is the am__doit target') : | |
3931 | case $s in #( | |
3932 | BSD) : | |
3933 | am__include='.include' am__quote='"' ;; #( | |
3934 | *) : | |
3935 | am__include='include' am__quote='' ;; | |
3936 | esac ;; #( | |
3937 | *) : | |
3938 | ;; | |
3939 | esac | |
3940 | if test "$am__include" != "#"; then | |
3941 | _am_result="yes ($s style)" | |
3942 | break | |
3943 | fi | |
3944 | done | |
3945 | rm -f confinc.* confmf.* | |
3946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 | |
3947 | $as_echo "${_am_result}" >&6; } | |
3948 | ||
3949 | # Check whether --enable-dependency-tracking was given. | |
3950 | if test "${enable_dependency_tracking+set}" = set; then : | |
3951 | enableval=$enable_dependency_tracking; | |
3952 | fi | |
3953 | ||
3954 | if test "x$enable_dependency_tracking" != xno; then | |
3955 | am_depcomp="$ac_aux_dir/depcomp" | |
3956 | AMDEPBACKSLASH='\' | |
3957 | am__nodep='_no' | |
3958 | fi | |
3959 | if test "x$enable_dependency_tracking" != xno; then | |
3960 | AMDEP_TRUE= | |
3961 | AMDEP_FALSE='#' | |
3962 | else | |
3963 | AMDEP_TRUE='#' | |
3964 | AMDEP_FALSE= | |
3965 | fi | |
3966 | ||
3967 | ||
3968 | ac_ext=c | |
3969 | ac_cpp='$CPP $CPPFLAGS' | |
3970 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3971 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3972 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3973 | if test -n "$ac_tool_prefix"; then | |
3974 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3975 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3977 | $as_echo_n "checking for $ac_word... " >&6; } | |
3978 | if ${ac_cv_prog_CC+:} false; then : | |
3979 | $as_echo_n "(cached) " >&6 | |
3980 | else | |
3981 | if test -n "$CC"; then | |
3982 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3983 | else | |
3984 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3985 | for as_dir in $PATH | |
3986 | do | |
3987 | IFS=$as_save_IFS | |
3988 | test -z "$as_dir" && as_dir=. | |
3989 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3990 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3991 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3992 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3993 | break 2 | |
3994 | fi | |
3995 | done | |
3996 | done | |
3997 | IFS=$as_save_IFS | |
3998 | ||
3999 | fi | |
4000 | fi | |
4001 | CC=$ac_cv_prog_CC | |
4002 | if test -n "$CC"; then | |
4003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4004 | $as_echo "$CC" >&6; } | |
4005 | else | |
4006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4007 | $as_echo "no" >&6; } | |
4008 | fi | |
4009 | ||
4010 | ||
4011 | fi | |
4012 | if test -z "$ac_cv_prog_CC"; then | |
4013 | ac_ct_CC=$CC | |
4014 | # Extract the first word of "gcc", so it can be a program name with args. | |
4015 | set dummy gcc; ac_word=$2 | |
4016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4017 | $as_echo_n "checking for $ac_word... " >&6; } | |
4018 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
4019 | $as_echo_n "(cached) " >&6 | |
4020 | else | |
4021 | if test -n "$ac_ct_CC"; then | |
4022 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4023 | else | |
4024 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4025 | for as_dir in $PATH | |
4026 | do | |
4027 | IFS=$as_save_IFS | |
4028 | test -z "$as_dir" && as_dir=. | |
4029 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4030 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4031 | ac_cv_prog_ac_ct_CC="gcc" | |
4032 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4033 | break 2 | |
4034 | fi | |
4035 | done | |
4036 | done | |
4037 | IFS=$as_save_IFS | |
4038 | ||
4039 | fi | |
4040 | fi | |
4041 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4042 | if test -n "$ac_ct_CC"; then | |
4043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4044 | $as_echo "$ac_ct_CC" >&6; } | |
4045 | else | |
4046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4047 | $as_echo "no" >&6; } | |
4048 | fi | |
4049 | ||
4050 | if test "x$ac_ct_CC" = x; then | |
4051 | CC="" | |
4052 | else | |
4053 | case $cross_compiling:$ac_tool_warned in | |
4054 | yes:) | |
4055 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4056 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4057 | ac_tool_warned=yes ;; | |
4058 | esac | |
4059 | CC=$ac_ct_CC | |
4060 | fi | |
4061 | else | |
4062 | CC="$ac_cv_prog_CC" | |
4063 | fi | |
4064 | ||
4065 | if test -z "$CC"; then | |
4066 | if test -n "$ac_tool_prefix"; then | |
4067 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
4068 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
4069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4070 | $as_echo_n "checking for $ac_word... " >&6; } | |
4071 | if ${ac_cv_prog_CC+:} false; then : | |
4072 | $as_echo_n "(cached) " >&6 | |
4073 | else | |
4074 | if test -n "$CC"; then | |
4075 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4076 | else | |
4077 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4078 | for as_dir in $PATH | |
4079 | do | |
4080 | IFS=$as_save_IFS | |
4081 | test -z "$as_dir" && as_dir=. | |
4082 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4083 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4084 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
4085 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4086 | break 2 | |
4087 | fi | |
4088 | done | |
4089 | done | |
4090 | IFS=$as_save_IFS | |
4091 | ||
4092 | fi | |
4093 | fi | |
4094 | CC=$ac_cv_prog_CC | |
4095 | if test -n "$CC"; then | |
4096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4097 | $as_echo "$CC" >&6; } | |
4098 | else | |
4099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4100 | $as_echo "no" >&6; } | |
4101 | fi | |
4102 | ||
4103 | ||
4104 | fi | |
4105 | fi | |
4106 | if test -z "$CC"; then | |
4107 | # Extract the first word of "cc", so it can be a program name with args. | |
4108 | set dummy cc; ac_word=$2 | |
4109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4110 | $as_echo_n "checking for $ac_word... " >&6; } | |
4111 | if ${ac_cv_prog_CC+:} false; then : | |
4112 | $as_echo_n "(cached) " >&6 | |
4113 | else | |
4114 | if test -n "$CC"; then | |
4115 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4116 | else | |
4117 | ac_prog_rejected=no | |
4118 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4119 | for as_dir in $PATH | |
4120 | do | |
4121 | IFS=$as_save_IFS | |
4122 | test -z "$as_dir" && as_dir=. | |
4123 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4124 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4125 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
4126 | ac_prog_rejected=yes | |
4127 | continue | |
4128 | fi | |
4129 | ac_cv_prog_CC="cc" | |
4130 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4131 | break 2 | |
4132 | fi | |
4133 | done | |
4134 | done | |
4135 | IFS=$as_save_IFS | |
4136 | ||
4137 | if test $ac_prog_rejected = yes; then | |
4138 | # We found a bogon in the path, so make sure we never use it. | |
4139 | set dummy $ac_cv_prog_CC | |
4140 | shift | |
4141 | if test $# != 0; then | |
4142 | # We chose a different compiler from the bogus one. | |
4143 | # However, it has the same basename, so the bogon will be chosen | |
4144 | # first if we set CC to just the basename; use the full file name. | |
4145 | shift | |
4146 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
4147 | fi | |
4148 | fi | |
4149 | fi | |
4150 | fi | |
4151 | CC=$ac_cv_prog_CC | |
4152 | if test -n "$CC"; then | |
4153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4154 | $as_echo "$CC" >&6; } | |
4155 | else | |
4156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4157 | $as_echo "no" >&6; } | |
4158 | fi | |
4159 | ||
4160 | ||
4161 | fi | |
4162 | if test -z "$CC"; then | |
4163 | if test -n "$ac_tool_prefix"; then | |
4164 | for ac_prog in cl.exe | |
4165 | do | |
4166 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
4167 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4169 | $as_echo_n "checking for $ac_word... " >&6; } | |
4170 | if ${ac_cv_prog_CC+:} false; then : | |
4171 | $as_echo_n "(cached) " >&6 | |
4172 | else | |
4173 | if test -n "$CC"; then | |
4174 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
4175 | else | |
4176 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4177 | for as_dir in $PATH | |
4178 | do | |
4179 | IFS=$as_save_IFS | |
4180 | test -z "$as_dir" && as_dir=. | |
4181 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4182 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4183 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4184 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4185 | break 2 | |
4186 | fi | |
4187 | done | |
4188 | done | |
4189 | IFS=$as_save_IFS | |
4190 | ||
4191 | fi | |
4192 | fi | |
4193 | CC=$ac_cv_prog_CC | |
4194 | if test -n "$CC"; then | |
4195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
4196 | $as_echo "$CC" >&6; } | |
4197 | else | |
4198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4199 | $as_echo "no" >&6; } | |
4200 | fi | |
4201 | ||
4202 | ||
4203 | test -n "$CC" && break | |
4204 | done | |
4205 | fi | |
4206 | if test -z "$CC"; then | |
4207 | ac_ct_CC=$CC | |
4208 | for ac_prog in cl.exe | |
4209 | do | |
4210 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4211 | set dummy $ac_prog; ac_word=$2 | |
4212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4213 | $as_echo_n "checking for $ac_word... " >&6; } | |
4214 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
4215 | $as_echo_n "(cached) " >&6 | |
4216 | else | |
4217 | if test -n "$ac_ct_CC"; then | |
4218 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
4219 | else | |
4220 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4221 | for as_dir in $PATH | |
4222 | do | |
4223 | IFS=$as_save_IFS | |
4224 | test -z "$as_dir" && as_dir=. | |
4225 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4226 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4227 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
4228 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4229 | break 2 | |
4230 | fi | |
4231 | done | |
4232 | done | |
4233 | IFS=$as_save_IFS | |
4234 | ||
4235 | fi | |
4236 | fi | |
4237 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
4238 | if test -n "$ac_ct_CC"; then | |
4239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
4240 | $as_echo "$ac_ct_CC" >&6; } | |
4241 | else | |
4242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4243 | $as_echo "no" >&6; } | |
4244 | fi | |
4245 | ||
4246 | ||
4247 | test -n "$ac_ct_CC" && break | |
4248 | done | |
4249 | ||
4250 | if test "x$ac_ct_CC" = x; then | |
4251 | CC="" | |
4252 | else | |
4253 | case $cross_compiling:$ac_tool_warned in | |
4254 | yes:) | |
4255 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4256 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4257 | ac_tool_warned=yes ;; | |
4258 | esac | |
4259 | CC=$ac_ct_CC | |
4260 | fi | |
4261 | fi | |
4262 | ||
4263 | fi | |
4264 | ||
4265 | ||
4266 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4267 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4268 | as_fn_error $? "no acceptable C compiler found in \$PATH | |
4269 | See \`config.log' for more details" "$LINENO" 5; } | |
4270 | ||
4271 | # Provide some information about the compiler. | |
4272 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
4273 | set X $ac_compile | |
4274 | ac_compiler=$2 | |
4275 | for ac_option in --version -v -V -qversion; do | |
4276 | { { ac_try="$ac_compiler $ac_option >&5" | |
4277 | case "(($ac_try" in | |
4278 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4279 | *) ac_try_echo=$ac_try;; | |
4280 | esac | |
4281 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4282 | $as_echo "$ac_try_echo"; } >&5 | |
4283 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
4284 | ac_status=$? | |
4285 | if test -s conftest.err; then | |
4286 | sed '10a\ | |
4287 | ... rest of stderr output deleted ... | |
4288 | 10q' conftest.err >conftest.er1 | |
4289 | cat conftest.er1 >&5 | |
4290 | fi | |
4291 | rm -f conftest.er1 conftest.err | |
4292 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4293 | test $ac_status = 0; } | |
4294 | done | |
4295 | ||
4296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4297 | /* end confdefs.h. */ | |
4298 | ||
4299 | int | |
4300 | main () | |
4301 | { | |
4302 | ||
4303 | ; | |
4304 | return 0; | |
4305 | } | |
4306 | _ACEOF | |
4307 | ac_clean_files_save=$ac_clean_files | |
4308 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
4309 | # Try to create an executable without -o first, disregard a.out. | |
4310 | # It will help us diagnose broken compilers, and finding out an intuition | |
4311 | # of exeext. | |
4312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
4313 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
4314 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
4315 | ||
4316 | # The possible output files: | |
4317 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
4318 | ||
4319 | ac_rmfiles= | |
4320 | for ac_file in $ac_files | |
4321 | do | |
4322 | case $ac_file in | |
4323 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4324 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
4325 | esac | |
4326 | done | |
4327 | rm -f $ac_rmfiles | |
4328 | ||
4329 | if { { ac_try="$ac_link_default" | |
4330 | case "(($ac_try" in | |
4331 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4332 | *) ac_try_echo=$ac_try;; | |
4333 | esac | |
4334 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4335 | $as_echo "$ac_try_echo"; } >&5 | |
4336 | (eval "$ac_link_default") 2>&5 | |
4337 | ac_status=$? | |
4338 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4339 | test $ac_status = 0; }; then : | |
4340 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
4341 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
4342 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
4343 | # so that the user can short-circuit this test for compilers unknown to | |
4344 | # Autoconf. | |
4345 | for ac_file in $ac_files '' | |
4346 | do | |
4347 | test -f "$ac_file" || continue | |
4348 | case $ac_file in | |
4349 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
4350 | ;; | |
4351 | [ab].out ) | |
4352 | # We found the default executable, but exeext='' is most | |
4353 | # certainly right. | |
4354 | break;; | |
4355 | *.* ) | |
4356 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; | |
4357 | then :; else | |
4358 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4359 | fi | |
4360 | # We set ac_cv_exeext here because the later test for it is not | |
4361 | # safe: cross compilers may not add the suffix if given an `-o' | |
4362 | # argument, so we may need to know it at that point already. | |
4363 | # Even if this section looks crufty: it has the advantage of | |
4364 | # actually working. | |
4365 | break;; | |
4366 | * ) | |
4367 | break;; | |
4368 | esac | |
4369 | done | |
4370 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
4371 | ||
4372 | else | |
4373 | ac_file='' | |
4374 | fi | |
4375 | if test -z "$ac_file"; then : | |
4376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4377 | $as_echo "no" >&6; } | |
4378 | $as_echo "$as_me: failed program was:" >&5 | |
4379 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4380 | ||
4381 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4382 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4383 | as_fn_error 77 "C compiler cannot create executables | |
4384 | See \`config.log' for more details" "$LINENO" 5; } | |
4385 | else | |
4386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4387 | $as_echo "yes" >&6; } | |
4388 | fi | |
4389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
4390 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
4391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
4392 | $as_echo "$ac_file" >&6; } | |
4393 | ac_exeext=$ac_cv_exeext | |
4394 | ||
4395 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
4396 | ac_clean_files=$ac_clean_files_save | |
4397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
4398 | $as_echo_n "checking for suffix of executables... " >&6; } | |
4399 | if { { ac_try="$ac_link" | |
4400 | case "(($ac_try" in | |
4401 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4402 | *) ac_try_echo=$ac_try;; | |
4403 | esac | |
4404 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4405 | $as_echo "$ac_try_echo"; } >&5 | |
4406 | (eval "$ac_link") 2>&5 | |
4407 | ac_status=$? | |
4408 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4409 | test $ac_status = 0; }; then : | |
4410 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
4411 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
4412 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
4413 | # `rm'. | |
4414 | for ac_file in conftest.exe conftest conftest.*; do | |
4415 | test -f "$ac_file" || continue | |
4416 | case $ac_file in | |
4417 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
4418 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
4419 | break;; | |
4420 | * ) break;; | |
4421 | esac | |
4422 | done | |
4423 | else | |
4424 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4425 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4426 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link | |
4427 | See \`config.log' for more details" "$LINENO" 5; } | |
4428 | fi | |
4429 | rm -f conftest conftest$ac_cv_exeext | |
4430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
4431 | $as_echo "$ac_cv_exeext" >&6; } | |
4432 | ||
4433 | rm -f conftest.$ac_ext | |
4434 | EXEEXT=$ac_cv_exeext | |
4435 | ac_exeext=$EXEEXT | |
4436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4437 | /* end confdefs.h. */ | |
4438 | #include <stdio.h> | |
4439 | int | |
4440 | main () | |
4441 | { | |
4442 | FILE *f = fopen ("conftest.out", "w"); | |
4443 | return ferror (f) || fclose (f) != 0; | |
4444 | ||
4445 | ; | |
4446 | return 0; | |
4447 | } | |
4448 | _ACEOF | |
4449 | ac_clean_files="$ac_clean_files conftest.out" | |
4450 | # Check that the compiler produces executables we can run. If not, either | |
4451 | # the compiler is broken, or we cross compile. | |
4452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
4453 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
4454 | if test "$cross_compiling" != yes; then | |
4455 | { { ac_try="$ac_link" | |
4456 | case "(($ac_try" in | |
4457 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4458 | *) ac_try_echo=$ac_try;; | |
4459 | esac | |
4460 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4461 | $as_echo "$ac_try_echo"; } >&5 | |
4462 | (eval "$ac_link") 2>&5 | |
4463 | ac_status=$? | |
4464 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4465 | test $ac_status = 0; } | |
4466 | if { ac_try='./conftest$ac_cv_exeext' | |
4467 | { { case "(($ac_try" in | |
4468 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4469 | *) ac_try_echo=$ac_try;; | |
4470 | esac | |
4471 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4472 | $as_echo "$ac_try_echo"; } >&5 | |
4473 | (eval "$ac_try") 2>&5 | |
4474 | ac_status=$? | |
4475 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4476 | test $ac_status = 0; }; }; then | |
4477 | cross_compiling=no | |
4478 | else | |
4479 | if test "$cross_compiling" = maybe; then | |
4480 | cross_compiling=yes | |
4481 | else | |
4482 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4483 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4484 | as_fn_error $? "cannot run C compiled programs. | |
4485 | If you meant to cross compile, use \`--host'. | |
4486 | See \`config.log' for more details" "$LINENO" 5; } | |
4487 | fi | |
4488 | fi | |
4489 | fi | |
4490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
4491 | $as_echo "$cross_compiling" >&6; } | |
4492 | ||
4493 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
4494 | ac_clean_files=$ac_clean_files_save | |
4495 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
4496 | $as_echo_n "checking for suffix of object files... " >&6; } | |
4497 | if ${ac_cv_objext+:} false; then : | |
4498 | $as_echo_n "(cached) " >&6 | |
4499 | else | |
4500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4501 | /* end confdefs.h. */ | |
4502 | ||
4503 | int | |
4504 | main () | |
4505 | { | |
4506 | ||
4507 | ; | |
4508 | return 0; | |
4509 | } | |
4510 | _ACEOF | |
4511 | rm -f conftest.o conftest.obj | |
4512 | if { { ac_try="$ac_compile" | |
4513 | case "(($ac_try" in | |
4514 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4515 | *) ac_try_echo=$ac_try;; | |
4516 | esac | |
4517 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4518 | $as_echo "$ac_try_echo"; } >&5 | |
4519 | (eval "$ac_compile") 2>&5 | |
4520 | ac_status=$? | |
4521 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4522 | test $ac_status = 0; }; then : | |
4523 | for ac_file in conftest.o conftest.obj conftest.*; do | |
4524 | test -f "$ac_file" || continue; | |
4525 | case $ac_file in | |
4526 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
4527 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
4528 | break;; | |
4529 | esac | |
4530 | done | |
4531 | else | |
4532 | $as_echo "$as_me: failed program was:" >&5 | |
4533 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4534 | ||
4535 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4536 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4537 | as_fn_error $? "cannot compute suffix of object files: cannot compile | |
4538 | See \`config.log' for more details" "$LINENO" 5; } | |
4539 | fi | |
4540 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
4541 | fi | |
4542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
4543 | $as_echo "$ac_cv_objext" >&6; } | |
4544 | OBJEXT=$ac_cv_objext | |
4545 | ac_objext=$OBJEXT | |
4546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
4547 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
4548 | if ${ac_cv_c_compiler_gnu+:} false; then : | |
4549 | $as_echo_n "(cached) " >&6 | |
4550 | else | |
4551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4552 | /* end confdefs.h. */ | |
4553 | ||
4554 | int | |
4555 | main () | |
4556 | { | |
4557 | #ifndef __GNUC__ | |
4558 | choke me | |
4559 | #endif | |
4560 | ||
4561 | ; | |
4562 | return 0; | |
4563 | } | |
4564 | _ACEOF | |
4565 | if ac_fn_c_try_compile "$LINENO"; then : | |
4566 | ac_compiler_gnu=yes | |
4567 | else | |
4568 | ac_compiler_gnu=no | |
4569 | fi | |
4570 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4571 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4572 | ||
4573 | fi | |
4574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
4575 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
4576 | if test $ac_compiler_gnu = yes; then | |
4577 | GCC=yes | |
4578 | else | |
4579 | GCC= | |
4580 | fi | |
4581 | ac_test_CFLAGS=${CFLAGS+set} | |
4582 | ac_save_CFLAGS=$CFLAGS | |
4583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
4584 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
4585 | if ${ac_cv_prog_cc_g+:} false; then : | |
4586 | $as_echo_n "(cached) " >&6 | |
4587 | else | |
4588 | ac_save_c_werror_flag=$ac_c_werror_flag | |
4589 | ac_c_werror_flag=yes | |
4590 | ac_cv_prog_cc_g=no | |
4591 | CFLAGS="-g" | |
4592 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4593 | /* end confdefs.h. */ | |
4594 | ||
4595 | int | |
4596 | main () | |
4597 | { | |
4598 | ||
4599 | ; | |
4600 | return 0; | |
4601 | } | |
4602 | _ACEOF | |
4603 | if ac_fn_c_try_compile "$LINENO"; then : | |
4604 | ac_cv_prog_cc_g=yes | |
4605 | else | |
4606 | CFLAGS="" | |
4607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4608 | /* end confdefs.h. */ | |
4609 | ||
4610 | int | |
4611 | main () | |
4612 | { | |
4613 | ||
4614 | ; | |
4615 | return 0; | |
4616 | } | |
4617 | _ACEOF | |
4618 | if ac_fn_c_try_compile "$LINENO"; then : | |
4619 | ||
4620 | else | |
4621 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4622 | CFLAGS="-g" | |
4623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4624 | /* end confdefs.h. */ | |
4625 | ||
4626 | int | |
4627 | main () | |
4628 | { | |
4629 | ||
4630 | ; | |
4631 | return 0; | |
4632 | } | |
4633 | _ACEOF | |
4634 | if ac_fn_c_try_compile "$LINENO"; then : | |
4635 | ac_cv_prog_cc_g=yes | |
4636 | fi | |
4637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4638 | fi | |
4639 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4640 | fi | |
4641 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4642 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4643 | fi | |
4644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
4645 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
4646 | if test "$ac_test_CFLAGS" = set; then | |
4647 | CFLAGS=$ac_save_CFLAGS | |
4648 | elif test $ac_cv_prog_cc_g = yes; then | |
4649 | if test "$GCC" = yes; then | |
4650 | CFLAGS="-g -O2" | |
4651 | else | |
4652 | CFLAGS="-g" | |
4653 | fi | |
4654 | else | |
4655 | if test "$GCC" = yes; then | |
4656 | CFLAGS="-O2" | |
4657 | else | |
4658 | CFLAGS= | |
4659 | fi | |
4660 | fi | |
4661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
4662 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
4663 | if ${ac_cv_prog_cc_c89+:} false; then : | |
4664 | $as_echo_n "(cached) " >&6 | |
4665 | else | |
4666 | ac_cv_prog_cc_c89=no | |
4667 | ac_save_CC=$CC | |
4668 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4669 | /* end confdefs.h. */ | |
4670 | #include <stdarg.h> | |
4671 | #include <stdio.h> | |
4672 | struct stat; | |
4673 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4674 | struct buf { int x; }; | |
4675 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4676 | static char *e (p, i) | |
4677 | char **p; | |
4678 | int i; | |
4679 | { | |
4680 | return p[i]; | |
4681 | } | |
4682 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4683 | { | |
4684 | char *s; | |
4685 | va_list v; | |
4686 | va_start (v,p); | |
4687 | s = g (p, va_arg (v,int)); | |
4688 | va_end (v); | |
4689 | return s; | |
4690 | } | |
4691 | ||
4692 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4693 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4694 | These don't provoke an error unfortunately, instead are silently treated | |
4695 | as 'x'. The following induces an error, until -std is added to get | |
4696 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4697 | array size at least. It's necessary to write '\x00'==0 to get something | |
4698 | that's true only with -std. */ | |
4699 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4700 | ||
4701 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4702 | inside strings and character constants. */ | |
4703 | #define FOO(x) 'x' | |
4704 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4705 | ||
4706 | int test (int i, double x); | |
4707 | struct s1 {int (*f) (int a);}; | |
4708 | struct s2 {int (*f) (double a);}; | |
4709 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4710 | int argc; | |
4711 | char **argv; | |
4712 | int | |
4713 | main () | |
4714 | { | |
4715 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4716 | ; | |
4717 | return 0; | |
4718 | } | |
4719 | _ACEOF | |
4720 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
4721 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4722 | do | |
4723 | CC="$ac_save_CC $ac_arg" | |
4724 | if ac_fn_c_try_compile "$LINENO"; then : | |
4725 | ac_cv_prog_cc_c89=$ac_arg | |
4726 | fi | |
4727 | rm -f core conftest.err conftest.$ac_objext | |
4728 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4729 | done | |
4730 | rm -f conftest.$ac_ext | |
4731 | CC=$ac_save_CC | |
4732 | ||
4733 | fi | |
4734 | # AC_CACHE_VAL | |
4735 | case "x$ac_cv_prog_cc_c89" in | |
4736 | x) | |
4737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4738 | $as_echo "none needed" >&6; } ;; | |
4739 | xno) | |
4740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4741 | $as_echo "unsupported" >&6; } ;; | |
4742 | *) | |
4743 | CC="$CC $ac_cv_prog_cc_c89" | |
4744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4745 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4746 | esac | |
4747 | if test "x$ac_cv_prog_cc_c89" != xno; then : | |
4748 | ||
4749 | fi | |
4750 | ||
4751 | ac_ext=c | |
4752 | ac_cpp='$CPP $CPPFLAGS' | |
4753 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4754 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4755 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4756 | ||
4757 | ac_ext=c | |
4758 | ac_cpp='$CPP $CPPFLAGS' | |
4759 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4760 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4761 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 | |
4763 | $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } | |
4764 | if ${am_cv_prog_cc_c_o+:} false; then : | |
4765 | $as_echo_n "(cached) " >&6 | |
4766 | else | |
4767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4768 | /* end confdefs.h. */ | |
4769 | ||
4770 | int | |
4771 | main () | |
4772 | { | |
4773 | ||
4774 | ; | |
4775 | return 0; | |
4776 | } | |
4777 | _ACEOF | |
4778 | # Make sure it works both with $CC and with simple cc. | |
4779 | # Following AC_PROG_CC_C_O, we do the test twice because some | |
4780 | # compilers refuse to overwrite an existing .o file with -o, | |
4781 | # though they will create one. | |
4782 | am_cv_prog_cc_c_o=yes | |
4783 | for am_i in 1 2; do | |
4784 | if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 | |
4785 | ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 | |
4786 | ac_status=$? | |
4787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4788 | (exit $ac_status); } \ | |
4789 | && test -f conftest2.$ac_objext; then | |
4790 | : OK | |
4791 | else | |
4792 | am_cv_prog_cc_c_o=no | |
4793 | break | |
4794 | fi | |
4795 | done | |
4796 | rm -f core conftest* | |
4797 | unset am_i | |
4798 | fi | |
4799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 | |
4800 | $as_echo "$am_cv_prog_cc_c_o" >&6; } | |
4801 | if test "$am_cv_prog_cc_c_o" != yes; then | |
4802 | # Losing compiler, so override with the script. | |
4803 | # FIXME: It is wrong to rewrite CC. | |
4804 | # But if we don't then we get into trouble of one sort or another. | |
4805 | # A longer-term fix would be to have automake use am__CC in this case, | |
4806 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
4807 | CC="$am_aux_dir/compile $CC" | |
4808 | fi | |
4809 | ac_ext=c | |
4810 | ac_cpp='$CPP $CPPFLAGS' | |
4811 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4812 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4813 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4814 | ||
4815 | ||
4816 | depcc="$CC" am_compiler_list= | |
4817 | ||
4818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
4819 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4820 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
4821 | $as_echo_n "(cached) " >&6 | |
4822 | else | |
4823 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
4824 | # We make a subdir and do the tests there. Otherwise we can end up | |
4825 | # making bogus files that we don't know about and never remove. For | |
4826 | # instance it was reported that on HP-UX the gcc test will end up | |
4827 | # making a dummy file named 'D' -- because '-MD' means "put the output | |
4828 | # in D". | |
4829 | rm -rf conftest.dir | |
4830 | mkdir conftest.dir | |
4831 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4832 | # using a relative directory. | |
4833 | cp "$am_depcomp" conftest.dir | |
4834 | cd conftest.dir | |
4835 | # We will build objects and dependencies in a subdirectory because | |
4836 | # it helps to detect inapplicable dependency modes. For instance | |
4837 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4838 | # side effect of compilation, but ICC will put the dependencies in | |
4839 | # the current directory while Tru64 will put them in the object | |
4840 | # directory. | |
4841 | mkdir sub | |
4842 | ||
4843 | am_cv_CC_dependencies_compiler_type=none | |
4844 | if test "$am_compiler_list" = ""; then | |
4845 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4846 | fi | |
4847 | am__universal=false | |
4848 | case " $depcc " in #( | |
4849 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
4850 | esac | |
4851 | ||
4852 | for depmode in $am_compiler_list; do | |
4853 | # Setup a source with many dependencies, because some compilers | |
4854 | # like to wrap large dependency lists on column 80 (with \), and | |
4855 | # we should not choose a depcomp mode which is confused by this. | |
4856 | # | |
4857 | # We need to recreate these files for each test, as the compiler may | |
4858 | # overwrite some of them when testing with obscure command lines. | |
4859 | # This happens at least with the AIX C compiler. | |
4860 | : > sub/conftest.c | |
4861 | for i in 1 2 3 4 5 6; do | |
4862 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4863 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
4864 | # Solaris 10 /bin/sh. | |
4865 | echo '/* dummy */' > sub/conftst$i.h | |
4866 | done | |
4867 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
4868 | ||
4869 | # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
4870 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4871 | # handle '-M -o', and we need to detect this. Also, some Intel | |
4872 | # versions had trouble with output in subdirs. | |
4873 | am__obj=sub/conftest.${OBJEXT-o} | |
4874 | am__minus_obj="-o $am__obj" | |
4875 | case $depmode in | |
4876 | gcc) | |
4877 | # This depmode causes a compiler race in universal mode. | |
4878 | test "$am__universal" = false || continue | |
4879 | ;; | |
4880 | nosideeffect) | |
4881 | # After this tag, mechanisms are not by side-effect, so they'll | |
4882 | # only be used when explicitly requested. | |
4883 | if test "x$enable_dependency_tracking" = xyes; then | |
4884 | continue | |
4885 | else | |
4886 | break | |
4887 | fi | |
4888 | ;; | |
4889 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
4890 | # This compiler won't grok '-c -o', but also, the minuso test has | |
4891 | # not run yet. These depmodes are late enough in the game, and | |
4892 | # so weak that their functioning should not be impacted. | |
4893 | am__obj=conftest.${OBJEXT-o} | |
4894 | am__minus_obj= | |
4895 | ;; | |
4896 | none) break ;; | |
4897 | esac | |
4898 | if depmode=$depmode \ | |
4899 | source=sub/conftest.c object=$am__obj \ | |
4900 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4901 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
4902 | >/dev/null 2>conftest.err && | |
4903 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
4904 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
4905 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
4906 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
4907 | # icc doesn't choke on unknown options, it will just issue warnings | |
4908 | # or remarks (even with -Werror). So we grep stderr for any message | |
4909 | # that says an option was ignored or not supported. | |
4910 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4911 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4912 | # The diagnosis changed in icc 8.0: | |
4913 | # icc: Command line remark: option '-MP' not supported | |
4914 | if (grep 'ignoring option' conftest.err || | |
4915 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4916 | am_cv_CC_dependencies_compiler_type=$depmode | |
4917 | break | |
4918 | fi | |
4919 | fi | |
4920 | done | |
4921 | ||
4922 | cd .. | |
4923 | rm -rf conftest.dir | |
4924 | else | |
4925 | am_cv_CC_dependencies_compiler_type=none | |
4926 | fi | |
4927 | ||
4928 | fi | |
4929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
4930 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
4931 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
4932 | ||
4933 | if | |
4934 | test "x$enable_dependency_tracking" != xno \ | |
4935 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
4936 | am__fastdepCC_TRUE= | |
4937 | am__fastdepCC_FALSE='#' | |
4938 | else | |
4939 | am__fastdepCC_TRUE='#' | |
4940 | am__fastdepCC_FALSE= | |
4941 | fi | |
4942 | ||
4943 | ||
4944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 | |
4945 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } | |
4946 | if ${ac_cv_prog_cc_c99+:} false; then : | |
4947 | $as_echo_n "(cached) " >&6 | |
4948 | else | |
4949 | ac_cv_prog_cc_c99=no | |
4950 | ac_save_CC=$CC | |
4951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4952 | /* end confdefs.h. */ | |
4953 | #include <stdarg.h> | |
4954 | #include <stdbool.h> | |
4955 | #include <stdlib.h> | |
4956 | #include <wchar.h> | |
4957 | #include <stdio.h> | |
4958 | ||
4959 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
4960 | #define debug(...) fprintf (stderr, __VA_ARGS__) | |
4961 | #define showlist(...) puts (#__VA_ARGS__) | |
4962 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
4963 | static void | |
4964 | test_varargs_macros (void) | |
4965 | { | |
4966 | int x = 1234; | |
4967 | int y = 5678; | |
4968 | debug ("Flag"); | |
4969 | debug ("X = %d\n", x); | |
4970 | showlist (The first, second, and third items.); | |
4971 | report (x>y, "x is %d but y is %d", x, y); | |
4972 | } | |
4973 | ||
4974 | // Check long long types. | |
4975 | #define BIG64 18446744073709551615ull | |
4976 | #define BIG32 4294967295ul | |
4977 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
4978 | #if !BIG_OK | |
4979 | your preprocessor is broken; | |
4980 | #endif | |
4981 | #if BIG_OK | |
4982 | #else | |
4983 | your preprocessor is broken; | |
4984 | #endif | |
4985 | static long long int bignum = -9223372036854775807LL; | |
4986 | static unsigned long long int ubignum = BIG64; | |
4987 | ||
4988 | struct incomplete_array | |
4989 | { | |
4990 | int datasize; | |
4991 | double data[]; | |
4992 | }; | |
4993 | ||
4994 | struct named_init { | |
4995 | int number; | |
4996 | const wchar_t *name; | |
4997 | double average; | |
4998 | }; | |
4999 | ||
5000 | typedef const char *ccp; | |
5001 | ||
5002 | static inline int | |
5003 | test_restrict (ccp restrict text) | |
5004 | { | |
5005 | // See if C++-style comments work. | |
5006 | // Iterate through items via the restricted pointer. | |
5007 | // Also check for declarations in for loops. | |
5008 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) | |
5009 | continue; | |
5010 | return 0; | |
5011 | } | |
5012 | ||
5013 | // Check varargs and va_copy. | |
5014 | static void | |
5015 | test_varargs (const char *format, ...) | |
5016 | { | |
5017 | va_list args; | |
5018 | va_start (args, format); | |
5019 | va_list args_copy; | |
5020 | va_copy (args_copy, args); | |
5021 | ||
5022 | const char *str; | |
5023 | int number; | |
5024 | float fnumber; | |
5025 | ||
5026 | while (*format) | |
5027 | { | |
5028 | switch (*format++) | |
5029 | { | |
5030 | case 's': // string | |
5031 | str = va_arg (args_copy, const char *); | |
5032 | break; | |
5033 | case 'd': // int | |
5034 | number = va_arg (args_copy, int); | |
5035 | break; | |
5036 | case 'f': // float | |
5037 | fnumber = va_arg (args_copy, double); | |
5038 | break; | |
5039 | default: | |
5040 | break; | |
5041 | } | |
5042 | } | |
5043 | va_end (args_copy); | |
5044 | va_end (args); | |
5045 | } | |
5046 | ||
5047 | int | |
5048 | main () | |
5049 | { | |
5050 | ||
5051 | // Check bool. | |
5052 | _Bool success = false; | |
5053 | ||
5054 | // Check restrict. | |
5055 | if (test_restrict ("String literal") == 0) | |
5056 | success = true; | |
5057 | char *restrict newvar = "Another string"; | |
5058 | ||
5059 | // Check varargs. | |
5060 | test_varargs ("s, d' f .", "string", 65, 34.234); | |
5061 | test_varargs_macros (); | |
5062 | ||
5063 | // Check flexible array members. | |
5064 | struct incomplete_array *ia = | |
5065 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
5066 | ia->datasize = 10; | |
5067 | for (int i = 0; i < ia->datasize; ++i) | |
5068 | ia->data[i] = i * 1.234; | |
5069 | ||
5070 | // Check named initializers. | |
5071 | struct named_init ni = { | |
5072 | .number = 34, | |
5073 | .name = L"Test wide string", | |
5074 | .average = 543.34343, | |
5075 | }; | |
5076 | ||
5077 | ni.number = 58; | |
5078 | ||
5079 | int dynamic_array[ni.number]; | |
5080 | dynamic_array[ni.number - 1] = 543; | |
5081 | ||
5082 | // work around unused variable warnings | |
5083 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' | |
5084 | || dynamic_array[ni.number - 1] != 543); | |
5085 | ||
5086 | ; | |
5087 | return 0; | |
5088 | } | |
5089 | _ACEOF | |
5090 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 | |
5091 | do | |
5092 | CC="$ac_save_CC $ac_arg" | |
5093 | if ac_fn_c_try_compile "$LINENO"; then : | |
5094 | ac_cv_prog_cc_c99=$ac_arg | |
5095 | fi | |
5096 | rm -f core conftest.err conftest.$ac_objext | |
5097 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
5098 | done | |
5099 | rm -f conftest.$ac_ext | |
5100 | CC=$ac_save_CC | |
5101 | ||
5102 | fi | |
5103 | # AC_CACHE_VAL | |
5104 | case "x$ac_cv_prog_cc_c99" in | |
5105 | x) | |
5106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
5107 | $as_echo "none needed" >&6; } ;; | |
5108 | xno) | |
5109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
5110 | $as_echo "unsupported" >&6; } ;; | |
5111 | *) | |
5112 | CC="$CC $ac_cv_prog_cc_c99" | |
5113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
5114 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; | |
5115 | esac | |
5116 | if test "x$ac_cv_prog_cc_c99" != xno; then : | |
5117 | ||
5118 | fi | |
5119 | ||
5120 | ||
5121 | ||
5122 | # For strnlen() and vasprintf(). | |
5123 | ||
5124 | ac_ext=c | |
5125 | ac_cpp='$CPP $CPPFLAGS' | |
5126 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5127 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5128 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
5130 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
5131 | # On Suns, sometimes $CPP names a directory. | |
5132 | if test -n "$CPP" && test -d "$CPP"; then | |
5133 | CPP= | |
5134 | fi | |
5135 | if test -z "$CPP"; then | |
5136 | if ${ac_cv_prog_CPP+:} false; then : | |
5137 | $as_echo_n "(cached) " >&6 | |
5138 | else | |
5139 | # Double quotes because CPP needs to be expanded | |
5140 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
5141 | do | |
5142 | ac_preproc_ok=false | |
5143 | for ac_c_preproc_warn_flag in '' yes | |
5144 | do | |
5145 | # Use a header file that comes with gcc, so configuring glibc | |
5146 | # with a fresh cross-compiler works. | |
5147 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5148 | # <limits.h> exists even on freestanding compilers. | |
5149 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5150 | # not just through cpp. "Syntax error" is here to catch this case. | |
5151 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5152 | /* end confdefs.h. */ | |
5153 | #ifdef __STDC__ | |
5154 | # include <limits.h> | |
5155 | #else | |
5156 | # include <assert.h> | |
5157 | #endif | |
5158 | Syntax error | |
5159 | _ACEOF | |
5160 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5161 | ||
5162 | else | |
5163 | # Broken: fails on valid input. | |
5164 | continue | |
5165 | fi | |
5166 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5167 | ||
5168 | # OK, works on sane cases. Now check whether nonexistent headers | |
5169 | # can be detected and how. | |
5170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5171 | /* end confdefs.h. */ | |
5172 | #include <ac_nonexistent.h> | |
5173 | _ACEOF | |
5174 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5175 | # Broken: success on invalid input. | |
5176 | continue | |
5177 | else | |
5178 | # Passes both tests. | |
5179 | ac_preproc_ok=: | |
5180 | break | |
5181 | fi | |
5182 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5183 | ||
5184 | done | |
5185 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5186 | rm -f conftest.i conftest.err conftest.$ac_ext | |
5187 | if $ac_preproc_ok; then : | |
5188 | break | |
5189 | fi | |
5190 | ||
5191 | done | |
5192 | ac_cv_prog_CPP=$CPP | |
5193 | ||
5194 | fi | |
5195 | CPP=$ac_cv_prog_CPP | |
5196 | else | |
5197 | ac_cv_prog_CPP=$CPP | |
5198 | fi | |
5199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
5200 | $as_echo "$CPP" >&6; } | |
5201 | ac_preproc_ok=false | |
5202 | for ac_c_preproc_warn_flag in '' yes | |
5203 | do | |
5204 | # Use a header file that comes with gcc, so configuring glibc | |
5205 | # with a fresh cross-compiler works. | |
5206 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5207 | # <limits.h> exists even on freestanding compilers. | |
5208 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
5209 | # not just through cpp. "Syntax error" is here to catch this case. | |
5210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5211 | /* end confdefs.h. */ | |
5212 | #ifdef __STDC__ | |
5213 | # include <limits.h> | |
5214 | #else | |
5215 | # include <assert.h> | |
5216 | #endif | |
5217 | Syntax error | |
5218 | _ACEOF | |
5219 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5220 | ||
5221 | else | |
5222 | # Broken: fails on valid input. | |
5223 | continue | |
5224 | fi | |
5225 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5226 | ||
5227 | # OK, works on sane cases. Now check whether nonexistent headers | |
5228 | # can be detected and how. | |
5229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5230 | /* end confdefs.h. */ | |
5231 | #include <ac_nonexistent.h> | |
5232 | _ACEOF | |
5233 | if ac_fn_c_try_cpp "$LINENO"; then : | |
5234 | # Broken: success on invalid input. | |
5235 | continue | |
5236 | else | |
5237 | # Passes both tests. | |
5238 | ac_preproc_ok=: | |
5239 | break | |
5240 | fi | |
5241 | rm -f conftest.err conftest.i conftest.$ac_ext | |
5242 | ||
5243 | done | |
5244 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
5245 | rm -f conftest.i conftest.err conftest.$ac_ext | |
5246 | if $ac_preproc_ok; then : | |
5247 | ||
5248 | else | |
5249 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5250 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5251 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
5252 | See \`config.log' for more details" "$LINENO" 5; } | |
5253 | fi | |
5254 | ||
5255 | ac_ext=c | |
5256 | ac_cpp='$CPP $CPPFLAGS' | |
5257 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5258 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5259 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5260 | ||
5261 | ||
5262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
5263 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
5264 | if ${ac_cv_path_GREP+:} false; then : | |
5265 | $as_echo_n "(cached) " >&6 | |
5266 | else | |
5267 | if test -z "$GREP"; then | |
5268 | ac_path_GREP_found=false | |
5269 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5270 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5271 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5272 | do | |
5273 | IFS=$as_save_IFS | |
5274 | test -z "$as_dir" && as_dir=. | |
5275 | for ac_prog in grep ggrep; do | |
5276 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5277 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
5278 | as_fn_executable_p "$ac_path_GREP" || continue | |
5279 | # Check for GNU ac_path_GREP and select it if it is found. | |
5280 | # Check for GNU $ac_path_GREP | |
5281 | case `"$ac_path_GREP" --version 2>&1` in | |
5282 | *GNU*) | |
5283 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
5284 | *) | |
5285 | ac_count=0 | |
5286 | $as_echo_n 0123456789 >"conftest.in" | |
5287 | while : | |
5288 | do | |
5289 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5290 | mv "conftest.tmp" "conftest.in" | |
5291 | cp "conftest.in" "conftest.nl" | |
5292 | $as_echo 'GREP' >> "conftest.nl" | |
5293 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5294 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5295 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5296 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
5297 | # Best one so far, save it but keep looking for a better one | |
5298 | ac_cv_path_GREP="$ac_path_GREP" | |
5299 | ac_path_GREP_max=$ac_count | |
5300 | fi | |
5301 | # 10*(2^10) chars as input seems more than enough | |
5302 | test $ac_count -gt 10 && break | |
5303 | done | |
5304 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5305 | esac | |
5306 | ||
5307 | $ac_path_GREP_found && break 3 | |
5308 | done | |
5309 | done | |
5310 | done | |
5311 | IFS=$as_save_IFS | |
5312 | if test -z "$ac_cv_path_GREP"; then | |
5313 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5314 | fi | |
5315 | else | |
5316 | ac_cv_path_GREP=$GREP | |
5317 | fi | |
5318 | ||
5319 | fi | |
5320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
5321 | $as_echo "$ac_cv_path_GREP" >&6; } | |
5322 | GREP="$ac_cv_path_GREP" | |
5323 | ||
5324 | ||
5325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
5326 | $as_echo_n "checking for egrep... " >&6; } | |
5327 | if ${ac_cv_path_EGREP+:} false; then : | |
5328 | $as_echo_n "(cached) " >&6 | |
5329 | else | |
5330 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
5331 | then ac_cv_path_EGREP="$GREP -E" | |
5332 | else | |
5333 | if test -z "$EGREP"; then | |
5334 | ac_path_EGREP_found=false | |
5335 | # Loop through the user's path and test for each of PROGNAME-LIST | |
5336 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5337 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
5338 | do | |
5339 | IFS=$as_save_IFS | |
5340 | test -z "$as_dir" && as_dir=. | |
5341 | for ac_prog in egrep; do | |
5342 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5343 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
5344 | as_fn_executable_p "$ac_path_EGREP" || continue | |
5345 | # Check for GNU ac_path_EGREP and select it if it is found. | |
5346 | # Check for GNU $ac_path_EGREP | |
5347 | case `"$ac_path_EGREP" --version 2>&1` in | |
5348 | *GNU*) | |
5349 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
5350 | *) | |
5351 | ac_count=0 | |
5352 | $as_echo_n 0123456789 >"conftest.in" | |
5353 | while : | |
5354 | do | |
5355 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
5356 | mv "conftest.tmp" "conftest.in" | |
5357 | cp "conftest.in" "conftest.nl" | |
5358 | $as_echo 'EGREP' >> "conftest.nl" | |
5359 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
5360 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
5361 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
5362 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
5363 | # Best one so far, save it but keep looking for a better one | |
5364 | ac_cv_path_EGREP="$ac_path_EGREP" | |
5365 | ac_path_EGREP_max=$ac_count | |
5366 | fi | |
5367 | # 10*(2^10) chars as input seems more than enough | |
5368 | test $ac_count -gt 10 && break | |
5369 | done | |
5370 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
5371 | esac | |
5372 | ||
5373 | $ac_path_EGREP_found && break 3 | |
5374 | done | |
5375 | done | |
5376 | done | |
5377 | IFS=$as_save_IFS | |
5378 | if test -z "$ac_cv_path_EGREP"; then | |
5379 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
5380 | fi | |
5381 | else | |
5382 | ac_cv_path_EGREP=$EGREP | |
5383 | fi | |
5384 | ||
5385 | fi | |
5386 | fi | |
5387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
5388 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
5389 | EGREP="$ac_cv_path_EGREP" | |
5390 | ||
5391 | ||
5392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
5393 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
5394 | if ${ac_cv_header_stdc+:} false; then : | |
5395 | $as_echo_n "(cached) " >&6 | |
5396 | else | |
5397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5398 | /* end confdefs.h. */ | |
5399 | #include <stdlib.h> | |
5400 | #include <stdarg.h> | |
5401 | #include <string.h> | |
5402 | #include <float.h> | |
5403 | ||
5404 | int | |
5405 | main () | |
5406 | { | |
5407 | ||
5408 | ; | |
5409 | return 0; | |
5410 | } | |
5411 | _ACEOF | |
5412 | if ac_fn_c_try_compile "$LINENO"; then : | |
5413 | ac_cv_header_stdc=yes | |
5414 | else | |
5415 | ac_cv_header_stdc=no | |
5416 | fi | |
5417 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5418 | ||
5419 | if test $ac_cv_header_stdc = yes; then | |
5420 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
5421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5422 | /* end confdefs.h. */ | |
5423 | #include <string.h> | |
5424 | ||
5425 | _ACEOF | |
5426 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5427 | $EGREP "memchr" >/dev/null 2>&1; then : | |
5428 | ||
5429 | else | |
5430 | ac_cv_header_stdc=no | |
5431 | fi | |
5432 | rm -f conftest* | |
5433 | ||
5434 | fi | |
5435 | ||
5436 | if test $ac_cv_header_stdc = yes; then | |
5437 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
5438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5439 | /* end confdefs.h. */ | |
5440 | #include <stdlib.h> | |
5441 | ||
5442 | _ACEOF | |
5443 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5444 | $EGREP "free" >/dev/null 2>&1; then : | |
5445 | ||
5446 | else | |
5447 | ac_cv_header_stdc=no | |
5448 | fi | |
5449 | rm -f conftest* | |
5450 | ||
5451 | fi | |
5452 | ||
5453 | if test $ac_cv_header_stdc = yes; then | |
5454 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
5455 | if test "$cross_compiling" = yes; then : | |
5456 | : | |
5457 | else | |
5458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5459 | /* end confdefs.h. */ | |
5460 | #include <ctype.h> | |
5461 | #include <stdlib.h> | |
5462 | #if ((' ' & 0x0FF) == 0x020) | |
5463 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5464 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5465 | #else | |
5466 | # define ISLOWER(c) \ | |
5467 | (('a' <= (c) && (c) <= 'i') \ | |
5468 | || ('j' <= (c) && (c) <= 'r') \ | |
5469 | || ('s' <= (c) && (c) <= 'z')) | |
5470 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5471 | #endif | |
5472 | ||
5473 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
5474 | int | |
5475 | main () | |
5476 | { | |
5477 | int i; | |
5478 | for (i = 0; i < 256; i++) | |
5479 | if (XOR (islower (i), ISLOWER (i)) | |
5480 | || toupper (i) != TOUPPER (i)) | |
5481 | return 2; | |
5482 | return 0; | |
5483 | } | |
5484 | _ACEOF | |
5485 | if ac_fn_c_try_run "$LINENO"; then : | |
5486 | ||
5487 | else | |
5488 | ac_cv_header_stdc=no | |
5489 | fi | |
5490 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5491 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5492 | fi | |
5493 | ||
5494 | fi | |
5495 | fi | |
5496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
5497 | $as_echo "$ac_cv_header_stdc" >&6; } | |
5498 | if test $ac_cv_header_stdc = yes; then | |
5499 | ||
5500 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
5501 | ||
5502 | fi | |
5503 | ||
5504 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
5505 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
5506 | inttypes.h stdint.h unistd.h | |
5507 | do : | |
5508 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5509 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
5510 | " | |
5511 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
5512 | cat >>confdefs.h <<_ACEOF | |
5513 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5514 | _ACEOF | |
5515 | ||
5516 | fi | |
5517 | ||
5518 | done | |
5519 | ||
5520 | ||
5521 | ||
5522 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | |
5523 | if test "x$ac_cv_header_minix_config_h" = xyes; then : | |
5524 | MINIX=yes | |
5525 | else | |
5526 | MINIX= | |
5527 | fi | |
5528 | ||
5529 | ||
5530 | if test "$MINIX" = yes; then | |
5531 | ||
5532 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h | |
5533 | ||
5534 | ||
5535 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
5536 | ||
5537 | ||
5538 | $as_echo "#define _MINIX 1" >>confdefs.h | |
5539 | ||
5540 | fi | |
5541 | ||
5542 | ||
5543 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
5544 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
5545 | if ${ac_cv_safe_to_define___extensions__+:} false; then : | |
5546 | $as_echo_n "(cached) " >&6 | |
5547 | else | |
5548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5549 | /* end confdefs.h. */ | |
5550 | ||
5551 | # define __EXTENSIONS__ 1 | |
5552 | $ac_includes_default | |
5553 | int | |
5554 | main () | |
5555 | { | |
5556 | ||
5557 | ; | |
5558 | return 0; | |
5559 | } | |
5560 | _ACEOF | |
5561 | if ac_fn_c_try_compile "$LINENO"; then : | |
5562 | ac_cv_safe_to_define___extensions__=yes | |
5563 | else | |
5564 | ac_cv_safe_to_define___extensions__=no | |
5565 | fi | |
5566 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5567 | fi | |
5568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
5569 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
5570 | test $ac_cv_safe_to_define___extensions__ = yes && | |
5571 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
5572 | ||
5573 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
5574 | ||
5575 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
5576 | ||
5577 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
5578 | ||
5579 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
5580 | ||
5581 | ||
5582 | ||
5583 | # Checks for typedefs, structures, and compiler characteristics. | |
5584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 | |
5585 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | |
5586 | if ${ac_cv_header_stdbool_h+:} false; then : | |
5587 | $as_echo_n "(cached) " >&6 | |
5588 | else | |
5589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5590 | /* end confdefs.h. */ | |
5591 | ||
5592 | #include <stdbool.h> | |
5593 | #ifndef bool | |
5594 | "error: bool is not defined" | |
5595 | #endif | |
5596 | #ifndef false | |
5597 | "error: false is not defined" | |
5598 | #endif | |
5599 | #if false | |
5600 | "error: false is not 0" | |
5601 | #endif | |
5602 | #ifndef true | |
5603 | "error: true is not defined" | |
5604 | #endif | |
5605 | #if true != 1 | |
5606 | "error: true is not 1" | |
5607 | #endif | |
5608 | #ifndef __bool_true_false_are_defined | |
5609 | "error: __bool_true_false_are_defined is not defined" | |
5610 | #endif | |
5611 | ||
5612 | struct s { _Bool s: 1; _Bool t; } s; | |
5613 | ||
5614 | char a[true == 1 ? 1 : -1]; | |
5615 | char b[false == 0 ? 1 : -1]; | |
5616 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | |
5617 | char d[(bool) 0.5 == true ? 1 : -1]; | |
5618 | /* See body of main program for 'e'. */ | |
5619 | char f[(_Bool) 0.0 == false ? 1 : -1]; | |
5620 | char g[true]; | |
5621 | char h[sizeof (_Bool)]; | |
5622 | char i[sizeof s.t]; | |
5623 | enum { j = false, k = true, l = false * true, m = true * 256 }; | |
5624 | /* The following fails for | |
5625 | HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ | |
5626 | _Bool n[m]; | |
5627 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | |
5628 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | |
5629 | /* Catch a bug in an HP-UX C compiler. See | |
5630 | http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html | |
5631 | http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html | |
5632 | */ | |
5633 | _Bool q = true; | |
5634 | _Bool *pq = &q; | |
5635 | ||
5636 | int | |
5637 | main () | |
5638 | { | |
5639 | ||
5640 | bool e = &s; | |
5641 | *pq |= q; | |
5642 | *pq |= ! q; | |
5643 | /* Refer to every declared value, to avoid compiler optimizations. */ | |
5644 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | |
5645 | + !m + !n + !o + !p + !q + !pq); | |
5646 | ||
5647 | ; | |
5648 | return 0; | |
5649 | } | |
5650 | _ACEOF | |
5651 | if ac_fn_c_try_compile "$LINENO"; then : | |
5652 | ac_cv_header_stdbool_h=yes | |
5653 | else | |
5654 | ac_cv_header_stdbool_h=no | |
5655 | fi | |
5656 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5657 | fi | |
5658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 | |
5659 | $as_echo "$ac_cv_header_stdbool_h" >&6; } | |
5660 | ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" | |
5661 | if test "x$ac_cv_type__Bool" = xyes; then : | |
5662 | ||
5663 | cat >>confdefs.h <<_ACEOF | |
5664 | #define HAVE__BOOL 1 | |
5665 | _ACEOF | |
5666 | ||
5667 | ||
5668 | fi | |
5669 | ||
5670 | ||
5671 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" | |
5672 | if test "x$ac_cv_type_mode_t" = xyes; then : | |
5673 | ||
5674 | cat >>confdefs.h <<_ACEOF | |
5675 | #define HAVE_MODE_T 1 | |
5676 | _ACEOF | |
5677 | ||
5678 | ||
5679 | else | |
5680 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5681 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5682 | as_fn_error $? "cannot find required type | |
5683 | See \`config.log' for more details" "$LINENO" 5; } | |
5684 | fi | |
5685 | ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" | |
5686 | if test "x$ac_cv_type_off_t" = xyes; then : | |
5687 | ||
5688 | cat >>confdefs.h <<_ACEOF | |
5689 | #define HAVE_OFF_T 1 | |
5690 | _ACEOF | |
5691 | ||
5692 | ||
5693 | else | |
5694 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5695 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5696 | as_fn_error $? "cannot find required type | |
5697 | See \`config.log' for more details" "$LINENO" 5; } | |
5698 | fi | |
5699 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
5700 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
5701 | ||
5702 | cat >>confdefs.h <<_ACEOF | |
5703 | #define HAVE_PID_T 1 | |
5704 | _ACEOF | |
5705 | ||
5706 | ||
5707 | else | |
5708 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5709 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5710 | as_fn_error $? "cannot find required type | |
5711 | See \`config.log' for more details" "$LINENO" 5; } | |
5712 | fi | |
5713 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
5714 | if test "x$ac_cv_type_size_t" = xyes; then : | |
5715 | ||
5716 | cat >>confdefs.h <<_ACEOF | |
5717 | #define HAVE_SIZE_T 1 | |
5718 | _ACEOF | |
5719 | ||
5720 | ||
5721 | else | |
5722 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5723 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5724 | as_fn_error $? "cannot find required type | |
5725 | See \`config.log' for more details" "$LINENO" 5; } | |
5726 | fi | |
5727 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" | |
5728 | if test "x$ac_cv_type_ssize_t" = xyes; then : | |
5729 | ||
5730 | cat >>confdefs.h <<_ACEOF | |
5731 | #define HAVE_SSIZE_T 1 | |
5732 | _ACEOF | |
5733 | ||
5734 | ||
5735 | else | |
5736 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5737 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5738 | as_fn_error $? "cannot find required type | |
5739 | See \`config.log' for more details" "$LINENO" 5; } | |
5740 | fi | |
5741 | ||
5742 | ||
5743 | # Checks for library functions. | |
5744 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
5745 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
5746 | ||
5747 | else | |
5748 | ||
5749 | cat >>confdefs.h <<_ACEOF | |
5750 | #define pid_t int | |
5751 | _ACEOF | |
5752 | ||
5753 | fi | |
5754 | ||
5755 | for ac_header in vfork.h | |
5756 | do : | |
5757 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
5758 | if test "x$ac_cv_header_vfork_h" = xyes; then : | |
5759 | cat >>confdefs.h <<_ACEOF | |
5760 | #define HAVE_VFORK_H 1 | |
5761 | _ACEOF | |
5762 | ||
5763 | fi | |
5764 | ||
5765 | done | |
5766 | ||
5767 | for ac_func in fork vfork | |
5768 | do : | |
5769 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5770 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5771 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
5772 | cat >>confdefs.h <<_ACEOF | |
5773 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5774 | _ACEOF | |
5775 | ||
5776 | fi | |
5777 | done | |
5778 | ||
5779 | if test "x$ac_cv_func_fork" = xyes; then | |
5780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
5781 | $as_echo_n "checking for working fork... " >&6; } | |
5782 | if ${ac_cv_func_fork_works+:} false; then : | |
5783 | $as_echo_n "(cached) " >&6 | |
5784 | else | |
5785 | if test "$cross_compiling" = yes; then : | |
5786 | ac_cv_func_fork_works=cross | |
5787 | else | |
5788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5789 | /* end confdefs.h. */ | |
5790 | $ac_includes_default | |
5791 | int | |
5792 | main () | |
5793 | { | |
5794 | ||
5795 | /* By Ruediger Kuhlmann. */ | |
5796 | return fork () < 0; | |
5797 | ||
5798 | ; | |
5799 | return 0; | |
5800 | } | |
5801 | _ACEOF | |
5802 | if ac_fn_c_try_run "$LINENO"; then : | |
5803 | ac_cv_func_fork_works=yes | |
5804 | else | |
5805 | ac_cv_func_fork_works=no | |
5806 | fi | |
5807 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5808 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5809 | fi | |
5810 | ||
5811 | fi | |
5812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
5813 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
5814 | ||
5815 | else | |
5816 | ac_cv_func_fork_works=$ac_cv_func_fork | |
5817 | fi | |
5818 | if test "x$ac_cv_func_fork_works" = xcross; then | |
5819 | case $host in | |
5820 | *-*-amigaos* | *-*-msdosdjgpp*) | |
5821 | # Override, as these systems have only a dummy fork() stub | |
5822 | ac_cv_func_fork_works=no | |
5823 | ;; | |
5824 | *) | |
5825 | ac_cv_func_fork_works=yes | |
5826 | ;; | |
5827 | esac | |
5828 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
5829 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
5830 | fi | |
5831 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
5832 | if test "x$ac_cv_func_vfork" = xyes; then | |
5833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
5834 | $as_echo_n "checking for working vfork... " >&6; } | |
5835 | if ${ac_cv_func_vfork_works+:} false; then : | |
5836 | $as_echo_n "(cached) " >&6 | |
5837 | else | |
5838 | if test "$cross_compiling" = yes; then : | |
5839 | ac_cv_func_vfork_works=cross | |
5840 | else | |
5841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5842 | /* end confdefs.h. */ | |
5843 | /* Thanks to Paul Eggert for this test. */ | |
5844 | $ac_includes_default | |
5845 | #include <sys/wait.h> | |
5846 | #ifdef HAVE_VFORK_H | |
5847 | # include <vfork.h> | |
5848 | #endif | |
5849 | /* On some sparc systems, changes by the child to local and incoming | |
5850 | argument registers are propagated back to the parent. The compiler | |
5851 | is told about this with #include <vfork.h>, but some compilers | |
5852 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
5853 | static variable whose address is put into a register that is | |
5854 | clobbered by the vfork. */ | |
5855 | static void | |
5856 | #ifdef __cplusplus | |
5857 | sparc_address_test (int arg) | |
5858 | # else | |
5859 | sparc_address_test (arg) int arg; | |
5860 | #endif | |
5861 | { | |
5862 | static pid_t child; | |
5863 | if (!child) { | |
5864 | child = vfork (); | |
5865 | if (child < 0) { | |
5866 | perror ("vfork"); | |
5867 | _exit(2); | |
5868 | } | |
5869 | if (!child) { | |
5870 | arg = getpid(); | |
5871 | write(-1, "", 0); | |
5872 | _exit (arg); | |
5873 | } | |
5874 | } | |
5875 | } | |
5876 | ||
5877 | int | |
5878 | main () | |
5879 | { | |
5880 | pid_t parent = getpid (); | |
5881 | pid_t child; | |
5882 | ||
5883 | sparc_address_test (0); | |
5884 | ||
5885 | child = vfork (); | |
5886 | ||
5887 | if (child == 0) { | |
5888 | /* Here is another test for sparc vfork register problems. This | |
5889 | test uses lots of local variables, at least as many local | |
5890 | variables as main has allocated so far including compiler | |
5891 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
5892 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
5893 | reuse the register of parent for one of the local variables, | |
5894 | since it will think that parent can't possibly be used any more | |
5895 | in this routine. Assigning to the local variable will thus | |
5896 | munge parent in the parent process. */ | |
5897 | pid_t | |
5898 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
5899 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
5900 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
5901 | use the same hardware register for all 8 local variables. */ | |
5902 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
5903 | || p != p5 || p != p6 || p != p7) | |
5904 | _exit(1); | |
5905 | ||
5906 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
5907 | from child file descriptors. If the child closes a descriptor | |
5908 | before it execs or exits, this munges the parent's descriptor | |
5909 | as well. Test for this by closing stdout in the child. */ | |
5910 | _exit(close(fileno(stdout)) != 0); | |
5911 | } else { | |
5912 | int status; | |
5913 | struct stat st; | |
5914 | ||
5915 | while (wait(&status) != child) | |
5916 | ; | |
5917 | return ( | |
5918 | /* Was there some problem with vforking? */ | |
5919 | child < 0 | |
5920 | ||
5921 | /* Did the child fail? (This shouldn't happen.) */ | |
5922 | || status | |
5923 | ||
5924 | /* Did the vfork/compiler bug occur? */ | |
5925 | || parent != getpid() | |
5926 | ||
5927 | /* Did the file descriptor bug occur? */ | |
5928 | || fstat(fileno(stdout), &st) != 0 | |
5929 | ); | |
5930 | } | |
5931 | } | |
5932 | _ACEOF | |
5933 | if ac_fn_c_try_run "$LINENO"; then : | |
5934 | ac_cv_func_vfork_works=yes | |
5935 | else | |
5936 | ac_cv_func_vfork_works=no | |
5937 | fi | |
5938 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5939 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5940 | fi | |
5941 | ||
5942 | fi | |
5943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 | |
5944 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
5945 | ||
5946 | fi; | |
5947 | if test "x$ac_cv_func_fork_works" = xcross; then | |
5948 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
5949 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
5950 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
5951 | fi | |
5952 | ||
5953 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
5954 | ||
5955 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h | |
5956 | ||
5957 | else | |
5958 | ||
5959 | $as_echo "#define vfork fork" >>confdefs.h | |
5960 | ||
5961 | fi | |
5962 | if test "x$ac_cv_func_fork_works" = xyes; then | |
5963 | ||
5964 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h | |
5965 | ||
5966 | fi | |
5967 | ||
5968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 | |
5969 | $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } | |
5970 | if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : | |
5971 | $as_echo_n "(cached) " >&6 | |
5972 | else | |
5973 | rm -f conftest.sym conftest.file | |
5974 | echo >conftest.file | |
5975 | if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then | |
5976 | if test "$cross_compiling" = yes; then : | |
5977 | ac_cv_func_lstat_dereferences_slashed_symlink=no | |
5978 | else | |
5979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5980 | /* end confdefs.h. */ | |
5981 | $ac_includes_default | |
5982 | int | |
5983 | main () | |
5984 | { | |
5985 | struct stat sbuf; | |
5986 | /* Linux will dereference the symlink and fail, as required by POSIX. | |
5987 | That is better in the sense that it means we will not | |
5988 | have to compile and use the lstat wrapper. */ | |
5989 | return lstat ("conftest.sym/", &sbuf) == 0; | |
5990 | ; | |
5991 | return 0; | |
5992 | } | |
5993 | _ACEOF | |
5994 | if ac_fn_c_try_run "$LINENO"; then : | |
5995 | ac_cv_func_lstat_dereferences_slashed_symlink=yes | |
5996 | else | |
5997 | ac_cv_func_lstat_dereferences_slashed_symlink=no | |
5998 | fi | |
5999 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6000 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6001 | fi | |
6002 | ||
6003 | else | |
6004 | # If the `ln -s' command failed, then we probably don't even | |
6005 | # have an lstat function. | |
6006 | ac_cv_func_lstat_dereferences_slashed_symlink=no | |
6007 | fi | |
6008 | rm -f conftest.sym conftest.file | |
6009 | ||
6010 | fi | |
6011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 | |
6012 | $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } | |
6013 | ||
6014 | test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && | |
6015 | ||
6016 | cat >>confdefs.h <<_ACEOF | |
6017 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
6018 | _ACEOF | |
6019 | ||
6020 | ||
6021 | if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then | |
6022 | case " $LIBOBJS " in | |
6023 | *" lstat.$ac_objext "* ) ;; | |
6024 | *) LIBOBJS="$LIBOBJS lstat.$ac_objext" | |
6025 | ;; | |
6026 | esac | |
6027 | ||
6028 | fi | |
6029 | ||
6030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 | |
6031 | $as_echo_n "checking for working strnlen... " >&6; } | |
6032 | if ${ac_cv_func_strnlen_working+:} false; then : | |
6033 | $as_echo_n "(cached) " >&6 | |
6034 | else | |
6035 | if test "$cross_compiling" = yes; then : | |
6036 | # Guess no on AIX systems, yes otherwise. | |
6037 | case "$host_os" in | |
6038 | aix*) ac_cv_func_strnlen_working=no;; | |
6039 | *) ac_cv_func_strnlen_working=yes;; | |
6040 | esac | |
6041 | else | |
6042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6043 | /* end confdefs.h. */ | |
6044 | $ac_includes_default | |
6045 | int | |
6046 | main () | |
6047 | { | |
6048 | ||
6049 | #define S "foobar" | |
6050 | #define S_LEN (sizeof S - 1) | |
6051 | ||
6052 | /* At least one implementation is buggy: that of AIX 4.3 would | |
6053 | give strnlen (S, 1) == 3. */ | |
6054 | ||
6055 | int i; | |
6056 | for (i = 0; i < S_LEN + 1; ++i) | |
6057 | { | |
6058 | int expected = i <= S_LEN ? i : S_LEN; | |
6059 | if (strnlen (S, i) != expected) | |
6060 | return 1; | |
6061 | } | |
6062 | return 0; | |
6063 | ||
6064 | ; | |
6065 | return 0; | |
6066 | } | |
6067 | _ACEOF | |
6068 | if ac_fn_c_try_run "$LINENO"; then : | |
6069 | ac_cv_func_strnlen_working=yes | |
6070 | else | |
6071 | ac_cv_func_strnlen_working=no | |
6072 | fi | |
6073 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6074 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6075 | fi | |
6076 | ||
6077 | fi | |
6078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 | |
6079 | $as_echo "$ac_cv_func_strnlen_working" >&6; } | |
6080 | test $ac_cv_func_strnlen_working = no && case " $LIBOBJS " in | |
6081 | *" strnlen.$ac_objext "* ) ;; | |
6082 | *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" | |
6083 | ;; | |
6084 | esac | |
6085 | ||
6086 | ||
6087 | for ac_func in atexit dup2 ftruncate getcwd gettimeofday localtime_r memchr memset mkdir rmdir setlocale socket strcasecmp strchr strdup strerror strncasecmp strndup strrchr strspn strstr strtol strtoul | |
6088 | do : | |
6089 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6090 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6091 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
6092 | cat >>confdefs.h <<_ACEOF | |
6093 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6094 | _ACEOF | |
6095 | ||
6096 | else | |
6097 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6098 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6099 | as_fn_error $? "cannot find the $ac_func function, which i3lock requires | |
6100 | See \`config.log' for more details" "$LINENO" 5; } | |
6101 | fi | |
6102 | done | |
6103 | ||
6104 | for ac_func in explicit_bzero | |
6105 | do : | |
6106 | ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" | |
6107 | if test "x$ac_cv_func_explicit_bzero" = xyes; then : | |
6108 | cat >>confdefs.h <<_ACEOF | |
6109 | #define HAVE_EXPLICIT_BZERO 1 | |
6110 | _ACEOF | |
6111 | ||
6112 | fi | |
6113 | done | |
6114 | ||
6115 | ||
6116 | # Checks for libraries. | |
6117 | ||
6118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 | |
6119 | $as_echo_n "checking for library containing floor... " >&6; } | |
6120 | if ${ac_cv_search_floor+:} false; then : | |
6121 | $as_echo_n "(cached) " >&6 | |
6122 | else | |
6123 | ac_func_search_save_LIBS=$LIBS | |
6124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6125 | /* end confdefs.h. */ | |
6126 | ||
6127 | /* Override any GCC internal prototype to avoid an error. | |
6128 | Use char because int might match the return type of a GCC | |
6129 | builtin and then its argument prototype would still apply. */ | |
6130 | #ifdef __cplusplus | |
6131 | extern "C" | |
6132 | #endif | |
6133 | char floor (); | |
6134 | int | |
6135 | main () | |
6136 | { | |
6137 | return floor (); | |
6138 | ; | |
6139 | return 0; | |
6140 | } | |
6141 | _ACEOF | |
6142 | for ac_lib in '' m; do | |
6143 | if test -z "$ac_lib"; then | |
6144 | ac_res="none required" | |
6145 | else | |
6146 | ac_res=-l$ac_lib | |
6147 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6148 | fi | |
6149 | if ac_fn_c_try_link "$LINENO"; then : | |
6150 | ac_cv_search_floor=$ac_res | |
6151 | fi | |
6152 | rm -f core conftest.err conftest.$ac_objext \ | |
6153 | conftest$ac_exeext | |
6154 | if ${ac_cv_search_floor+:} false; then : | |
6155 | break | |
6156 | fi | |
6157 | done | |
6158 | if ${ac_cv_search_floor+:} false; then : | |
6159 | ||
6160 | else | |
6161 | ac_cv_search_floor=no | |
6162 | fi | |
6163 | rm conftest.$ac_ext | |
6164 | LIBS=$ac_func_search_save_LIBS | |
6165 | fi | |
6166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 | |
6167 | $as_echo "$ac_cv_search_floor" >&6; } | |
6168 | ac_res=$ac_cv_search_floor | |
6169 | if test "$ac_res" != no; then : | |
6170 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6171 | ||
6172 | else | |
6173 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6174 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6175 | as_fn_error $? "cannot find the required floor() function despite trying to link with -lm | |
6176 | See \`config.log' for more details" "$LINENO" 5; } | |
6177 | fi | |
6178 | ||
6179 | ||
6180 | # libev does not ship with a pkg-config file :(. | |
6181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ev_run" >&5 | |
6182 | $as_echo_n "checking for library containing ev_run... " >&6; } | |
6183 | if ${ac_cv_search_ev_run+:} false; then : | |
6184 | $as_echo_n "(cached) " >&6 | |
6185 | else | |
6186 | ac_func_search_save_LIBS=$LIBS | |
6187 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6188 | /* end confdefs.h. */ | |
6189 | ||
6190 | /* Override any GCC internal prototype to avoid an error. | |
6191 | Use char because int might match the return type of a GCC | |
6192 | builtin and then its argument prototype would still apply. */ | |
6193 | #ifdef __cplusplus | |
6194 | extern "C" | |
6195 | #endif | |
6196 | char ev_run (); | |
6197 | int | |
6198 | main () | |
6199 | { | |
6200 | return ev_run (); | |
6201 | ; | |
6202 | return 0; | |
6203 | } | |
6204 | _ACEOF | |
6205 | for ac_lib in '' ev; do | |
6206 | if test -z "$ac_lib"; then | |
6207 | ac_res="none required" | |
6208 | else | |
6209 | ac_res=-l$ac_lib | |
6210 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6211 | fi | |
6212 | if ac_fn_c_try_link "$LINENO"; then : | |
6213 | ac_cv_search_ev_run=$ac_res | |
6214 | fi | |
6215 | rm -f core conftest.err conftest.$ac_objext \ | |
6216 | conftest$ac_exeext | |
6217 | if ${ac_cv_search_ev_run+:} false; then : | |
6218 | break | |
6219 | fi | |
6220 | done | |
6221 | if ${ac_cv_search_ev_run+:} false; then : | |
6222 | ||
6223 | else | |
6224 | ac_cv_search_ev_run=no | |
6225 | fi | |
6226 | rm conftest.$ac_ext | |
6227 | LIBS=$ac_func_search_save_LIBS | |
6228 | fi | |
6229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ev_run" >&5 | |
6230 | $as_echo "$ac_cv_search_ev_run" >&6; } | |
6231 | ac_res=$ac_cv_search_ev_run | |
6232 | if test "$ac_res" != no; then : | |
6233 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6234 | ||
6235 | else | |
6236 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6237 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6238 | as_fn_error $? "cannot find the required ev_run() function despite trying to link with -lev | |
6239 | See \`config.log' for more details" "$LINENO" 5; } | |
6240 | fi | |
6241 | ||
6242 | ||
6243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5 | |
6244 | $as_echo_n "checking for library containing shm_open... " >&6; } | |
6245 | if ${ac_cv_search_shm_open+:} false; then : | |
6246 | $as_echo_n "(cached) " >&6 | |
6247 | else | |
6248 | ac_func_search_save_LIBS=$LIBS | |
6249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6250 | /* end confdefs.h. */ | |
6251 | ||
6252 | /* Override any GCC internal prototype to avoid an error. | |
6253 | Use char because int might match the return type of a GCC | |
6254 | builtin and then its argument prototype would still apply. */ | |
6255 | #ifdef __cplusplus | |
6256 | extern "C" | |
6257 | #endif | |
6258 | char shm_open (); | |
6259 | int | |
6260 | main () | |
6261 | { | |
6262 | return shm_open (); | |
6263 | ; | |
6264 | return 0; | |
6265 | } | |
6266 | _ACEOF | |
6267 | for ac_lib in '' rt; do | |
6268 | if test -z "$ac_lib"; then | |
6269 | ac_res="none required" | |
6270 | else | |
6271 | ac_res=-l$ac_lib | |
6272 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6273 | fi | |
6274 | if ac_fn_c_try_link "$LINENO"; then : | |
6275 | ac_cv_search_shm_open=$ac_res | |
6276 | fi | |
6277 | rm -f core conftest.err conftest.$ac_objext \ | |
6278 | conftest$ac_exeext | |
6279 | if ${ac_cv_search_shm_open+:} false; then : | |
6280 | break | |
6281 | fi | |
6282 | done | |
6283 | if ${ac_cv_search_shm_open+:} false; then : | |
6284 | ||
6285 | else | |
6286 | ac_cv_search_shm_open=no | |
6287 | fi | |
6288 | rm conftest.$ac_ext | |
6289 | LIBS=$ac_func_search_save_LIBS | |
6290 | fi | |
6291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 | |
6292 | $as_echo "$ac_cv_search_shm_open" >&6; } | |
6293 | ac_res=$ac_cv_search_shm_open | |
6294 | if test "$ac_res" != no; then : | |
6295 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6296 | ||
6297 | fi | |
6298 | ||
6299 | ||
6300 | # Only disable PAM on OpenBSD where i3lock uses BSD Auth instead | |
6301 | case "$host" in | |
6302 | *-openbsd*) | |
6303 | # Nothing yet. | |
6304 | ;; | |
6305 | *) | |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pam_authenticate" >&5 | |
6307 | $as_echo_n "checking for library containing pam_authenticate... " >&6; } | |
6308 | if ${ac_cv_search_pam_authenticate+:} false; then : | |
6309 | $as_echo_n "(cached) " >&6 | |
6310 | else | |
6311 | ac_func_search_save_LIBS=$LIBS | |
6312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6313 | /* end confdefs.h. */ | |
6314 | ||
6315 | /* Override any GCC internal prototype to avoid an error. | |
6316 | Use char because int might match the return type of a GCC | |
6317 | builtin and then its argument prototype would still apply. */ | |
6318 | #ifdef __cplusplus | |
6319 | extern "C" | |
6320 | #endif | |
6321 | char pam_authenticate (); | |
6322 | int | |
6323 | main () | |
6324 | { | |
6325 | return pam_authenticate (); | |
6326 | ; | |
6327 | return 0; | |
6328 | } | |
6329 | _ACEOF | |
6330 | for ac_lib in '' pam; do | |
6331 | if test -z "$ac_lib"; then | |
6332 | ac_res="none required" | |
6333 | else | |
6334 | ac_res=-l$ac_lib | |
6335 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6336 | fi | |
6337 | if ac_fn_c_try_link "$LINENO"; then : | |
6338 | ac_cv_search_pam_authenticate=$ac_res | |
6339 | fi | |
6340 | rm -f core conftest.err conftest.$ac_objext \ | |
6341 | conftest$ac_exeext | |
6342 | if ${ac_cv_search_pam_authenticate+:} false; then : | |
6343 | break | |
6344 | fi | |
6345 | done | |
6346 | if ${ac_cv_search_pam_authenticate+:} false; then : | |
6347 | ||
6348 | else | |
6349 | ac_cv_search_pam_authenticate=no | |
6350 | fi | |
6351 | rm conftest.$ac_ext | |
6352 | LIBS=$ac_func_search_save_LIBS | |
6353 | fi | |
6354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pam_authenticate" >&5 | |
6355 | $as_echo "$ac_cv_search_pam_authenticate" >&6; } | |
6356 | ac_res=$ac_cv_search_pam_authenticate | |
6357 | if test "$ac_res" != no; then : | |
6358 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6359 | ||
6360 | fi | |
6361 | ||
6362 | ;; | |
6363 | esac | |
6364 | ||
6365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv_open" >&5 | |
6366 | $as_echo_n "checking for library containing iconv_open... " >&6; } | |
6367 | if ${ac_cv_search_iconv_open+:} false; then : | |
6368 | $as_echo_n "(cached) " >&6 | |
6369 | else | |
6370 | ac_func_search_save_LIBS=$LIBS | |
6371 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6372 | /* end confdefs.h. */ | |
6373 | ||
6374 | /* Override any GCC internal prototype to avoid an error. | |
6375 | Use char because int might match the return type of a GCC | |
6376 | builtin and then its argument prototype would still apply. */ | |
6377 | #ifdef __cplusplus | |
6378 | extern "C" | |
6379 | #endif | |
6380 | char iconv_open (); | |
6381 | int | |
6382 | main () | |
6383 | { | |
6384 | return iconv_open (); | |
6385 | ; | |
6386 | return 0; | |
6387 | } | |
6388 | _ACEOF | |
6389 | for ac_lib in '' iconv; do | |
6390 | if test -z "$ac_lib"; then | |
6391 | ac_res="none required" | |
6392 | else | |
6393 | ac_res=-l$ac_lib | |
6394 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6395 | fi | |
6396 | if ac_fn_c_try_link "$LINENO"; then : | |
6397 | ac_cv_search_iconv_open=$ac_res | |
6398 | fi | |
6399 | rm -f core conftest.err conftest.$ac_objext \ | |
6400 | conftest$ac_exeext | |
6401 | if ${ac_cv_search_iconv_open+:} false; then : | |
6402 | break | |
6403 | fi | |
6404 | done | |
6405 | if ${ac_cv_search_iconv_open+:} false; then : | |
6406 | ||
6407 | else | |
6408 | ac_cv_search_iconv_open=no | |
6409 | fi | |
6410 | rm conftest.$ac_ext | |
6411 | LIBS=$ac_func_search_save_LIBS | |
6412 | fi | |
6413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv_open" >&5 | |
6414 | $as_echo "$ac_cv_search_iconv_open" >&6; } | |
6415 | ac_res=$ac_cv_search_iconv_open | |
6416 | if test "$ac_res" != no; then : | |
6417 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6418 | ||
6419 | else | |
6420 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6421 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6422 | as_fn_error $? "cannot find the required iconv_open() function despite trying to link with -liconv | |
6423 | See \`config.log' for more details" "$LINENO" 5; } | |
6424 | fi | |
6425 | ||
6426 | ||
6427 | ||
6428 | ||
6429 | ||
6430 | ||
6431 | ||
6432 | ||
6433 | ||
6434 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
6435 | if test -n "$ac_tool_prefix"; then | |
6436 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
6437 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
6438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6439 | $as_echo_n "checking for $ac_word... " >&6; } | |
6440 | if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
6441 | $as_echo_n "(cached) " >&6 | |
6442 | else | |
6443 | case $PKG_CONFIG in | |
6444 | [\\/]* | ?:[\\/]*) | |
6445 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6446 | ;; | |
6447 | *) | |
6448 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6449 | for as_dir in $PATH | |
6450 | do | |
6451 | IFS=$as_save_IFS | |
6452 | test -z "$as_dir" && as_dir=. | |
6453 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6454 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6455 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6456 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6457 | break 2 | |
6458 | fi | |
6459 | done | |
6460 | done | |
6461 | IFS=$as_save_IFS | |
6462 | ||
6463 | ;; | |
6464 | esac | |
6465 | fi | |
6466 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6467 | if test -n "$PKG_CONFIG"; then | |
6468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6469 | $as_echo "$PKG_CONFIG" >&6; } | |
6470 | else | |
6471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6472 | $as_echo "no" >&6; } | |
6473 | fi | |
6474 | ||
6475 | ||
6476 | fi | |
6477 | if test -z "$ac_cv_path_PKG_CONFIG"; then | |
6478 | ac_pt_PKG_CONFIG=$PKG_CONFIG | |
6479 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6480 | set dummy pkg-config; ac_word=$2 | |
6481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6482 | $as_echo_n "checking for $ac_word... " >&6; } | |
6483 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
6484 | $as_echo_n "(cached) " >&6 | |
6485 | else | |
6486 | case $ac_pt_PKG_CONFIG in | |
6487 | [\\/]* | ?:[\\/]*) | |
6488 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
6489 | ;; | |
6490 | *) | |
6491 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6492 | for as_dir in $PATH | |
6493 | do | |
6494 | IFS=$as_save_IFS | |
6495 | test -z "$as_dir" && as_dir=. | |
6496 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6497 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6498 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6499 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6500 | break 2 | |
6501 | fi | |
6502 | done | |
6503 | done | |
6504 | IFS=$as_save_IFS | |
6505 | ||
6506 | ;; | |
6507 | esac | |
6508 | fi | |
6509 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6510 | if test -n "$ac_pt_PKG_CONFIG"; then | |
6511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6512 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6513 | else | |
6514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6515 | $as_echo "no" >&6; } | |
6516 | fi | |
6517 | ||
6518 | if test "x$ac_pt_PKG_CONFIG" = x; then | |
6519 | PKG_CONFIG="" | |
6520 | else | |
6521 | case $cross_compiling:$ac_tool_warned in | |
6522 | yes:) | |
6523 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6524 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6525 | ac_tool_warned=yes ;; | |
6526 | esac | |
6527 | PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6528 | fi | |
6529 | else | |
6530 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
6531 | fi | |
6532 | ||
6533 | fi | |
6534 | if test -n "$PKG_CONFIG"; then | |
6535 | _pkg_min_version=0.9.0 | |
6536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6537 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6538 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6540 | $as_echo "yes" >&6; } | |
6541 | else | |
6542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6543 | $as_echo "no" >&6; } | |
6544 | PKG_CONFIG="" | |
6545 | fi | |
6546 | fi | |
6547 | ||
6548 | pkg_failed=no | |
6549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB" >&5 | |
6550 | $as_echo_n "checking for XCB... " >&6; } | |
6551 | ||
6552 | if test -n "$XCB_CFLAGS"; then | |
6553 | pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" | |
6554 | elif test -n "$PKG_CONFIG"; then | |
6555 | if test -n "$PKG_CONFIG" && \ | |
6556 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-xkb xcb-xinerama xcb-randr\""; } >&5 | |
6557 | ($PKG_CONFIG --exists --print-errors "xcb xcb-xkb xcb-xinerama xcb-randr") 2>&5 | |
6558 | ac_status=$? | |
6559 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6560 | test $ac_status = 0; }; then | |
6561 | pkg_cv_XCB_CFLAGS=`$PKG_CONFIG --cflags "xcb xcb-xkb xcb-xinerama xcb-randr" 2>/dev/null` | |
6562 | test "x$?" != "x0" && pkg_failed=yes | |
6563 | else | |
6564 | pkg_failed=yes | |
6565 | fi | |
6566 | else | |
6567 | pkg_failed=untried | |
6568 | fi | |
6569 | if test -n "$XCB_LIBS"; then | |
6570 | pkg_cv_XCB_LIBS="$XCB_LIBS" | |
6571 | elif test -n "$PKG_CONFIG"; then | |
6572 | if test -n "$PKG_CONFIG" && \ | |
6573 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-xkb xcb-xinerama xcb-randr\""; } >&5 | |
6574 | ($PKG_CONFIG --exists --print-errors "xcb xcb-xkb xcb-xinerama xcb-randr") 2>&5 | |
6575 | ac_status=$? | |
6576 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6577 | test $ac_status = 0; }; then | |
6578 | pkg_cv_XCB_LIBS=`$PKG_CONFIG --libs "xcb xcb-xkb xcb-xinerama xcb-randr" 2>/dev/null` | |
6579 | test "x$?" != "x0" && pkg_failed=yes | |
6580 | else | |
6581 | pkg_failed=yes | |
6582 | fi | |
6583 | else | |
6584 | pkg_failed=untried | |
6585 | fi | |
6586 | ||
6587 | ||
6588 | ||
6589 | if test $pkg_failed = yes; then | |
6590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6591 | $as_echo "no" >&6; } | |
6592 | ||
6593 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
6594 | _pkg_short_errors_supported=yes | |
6595 | else | |
6596 | _pkg_short_errors_supported=no | |
6597 | fi | |
6598 | if test $_pkg_short_errors_supported = yes; then | |
6599 | XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb xcb-xkb xcb-xinerama xcb-randr" 2>&1` | |
6600 | else | |
6601 | XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb xcb-xkb xcb-xinerama xcb-randr" 2>&1` | |
6602 | fi | |
6603 | # Put the nasty error message in config.log where it belongs | |
6604 | echo "$XCB_PKG_ERRORS" >&5 | |
6605 | ||
6606 | as_fn_error $? "Package requirements (xcb xcb-xkb xcb-xinerama xcb-randr) were not met: | |
6607 | ||
6608 | $XCB_PKG_ERRORS | |
6609 | ||
6610 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
6611 | installed software in a non-standard prefix. | |
6612 | ||
6613 | Alternatively, you may set the environment variables XCB_CFLAGS | |
6614 | and XCB_LIBS to avoid the need to call pkg-config. | |
6615 | See the pkg-config man page for more details." "$LINENO" 5 | |
6616 | elif test $pkg_failed = untried; then | |
6617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6618 | $as_echo "no" >&6; } | |
6619 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6620 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6621 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | |
6622 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
6623 | path to pkg-config. | |
6624 | ||
6625 | Alternatively, you may set the environment variables XCB_CFLAGS | |
6626 | and XCB_LIBS to avoid the need to call pkg-config. | |
6627 | See the pkg-config man page for more details. | |
6628 | ||
6629 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | |
6630 | See \`config.log' for more details" "$LINENO" 5; } | |
6631 | else | |
6632 | XCB_CFLAGS=$pkg_cv_XCB_CFLAGS | |
6633 | XCB_LIBS=$pkg_cv_XCB_LIBS | |
6634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6635 | $as_echo "yes" >&6; } | |
6636 | ||
6637 | fi | |
6638 | ||
6639 | pkg_failed=no | |
6640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_IMAGE" >&5 | |
6641 | $as_echo_n "checking for XCB_IMAGE... " >&6; } | |
6642 | ||
6643 | if test -n "$XCB_IMAGE_CFLAGS"; then | |
6644 | pkg_cv_XCB_IMAGE_CFLAGS="$XCB_IMAGE_CFLAGS" | |
6645 | elif test -n "$PKG_CONFIG"; then | |
6646 | if test -n "$PKG_CONFIG" && \ | |
6647 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-image\""; } >&5 | |
6648 | ($PKG_CONFIG --exists --print-errors "xcb-image") 2>&5 | |
6649 | ac_status=$? | |
6650 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6651 | test $ac_status = 0; }; then | |
6652 | pkg_cv_XCB_IMAGE_CFLAGS=`$PKG_CONFIG --cflags "xcb-image" 2>/dev/null` | |
6653 | test "x$?" != "x0" && pkg_failed=yes | |
6654 | else | |
6655 | pkg_failed=yes | |
6656 | fi | |
6657 | else | |
6658 | pkg_failed=untried | |
6659 | fi | |
6660 | if test -n "$XCB_IMAGE_LIBS"; then | |
6661 | pkg_cv_XCB_IMAGE_LIBS="$XCB_IMAGE_LIBS" | |
6662 | elif test -n "$PKG_CONFIG"; then | |
6663 | if test -n "$PKG_CONFIG" && \ | |
6664 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-image\""; } >&5 | |
6665 | ($PKG_CONFIG --exists --print-errors "xcb-image") 2>&5 | |
6666 | ac_status=$? | |
6667 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6668 | test $ac_status = 0; }; then | |
6669 | pkg_cv_XCB_IMAGE_LIBS=`$PKG_CONFIG --libs "xcb-image" 2>/dev/null` | |
6670 | test "x$?" != "x0" && pkg_failed=yes | |
6671 | else | |
6672 | pkg_failed=yes | |
6673 | fi | |
6674 | else | |
6675 | pkg_failed=untried | |
6676 | fi | |
6677 | ||
6678 | ||
6679 | ||
6680 | if test $pkg_failed = yes; then | |
6681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6682 | $as_echo "no" >&6; } | |
6683 | ||
6684 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
6685 | _pkg_short_errors_supported=yes | |
6686 | else | |
6687 | _pkg_short_errors_supported=no | |
6688 | fi | |
6689 | if test $_pkg_short_errors_supported = yes; then | |
6690 | XCB_IMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb-image" 2>&1` | |
6691 | else | |
6692 | XCB_IMAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb-image" 2>&1` | |
6693 | fi | |
6694 | # Put the nasty error message in config.log where it belongs | |
6695 | echo "$XCB_IMAGE_PKG_ERRORS" >&5 | |
6696 | ||
6697 | as_fn_error $? "Package requirements (xcb-image) were not met: | |
6698 | ||
6699 | $XCB_IMAGE_PKG_ERRORS | |
6700 | ||
6701 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
6702 | installed software in a non-standard prefix. | |
6703 | ||
6704 | Alternatively, you may set the environment variables XCB_IMAGE_CFLAGS | |
6705 | and XCB_IMAGE_LIBS to avoid the need to call pkg-config. | |
6706 | See the pkg-config man page for more details." "$LINENO" 5 | |
6707 | elif test $pkg_failed = untried; then | |
6708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6709 | $as_echo "no" >&6; } | |
6710 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6711 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6712 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | |
6713 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
6714 | path to pkg-config. | |
6715 | ||
6716 | Alternatively, you may set the environment variables XCB_IMAGE_CFLAGS | |
6717 | and XCB_IMAGE_LIBS to avoid the need to call pkg-config. | |
6718 | See the pkg-config man page for more details. | |
6719 | ||
6720 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | |
6721 | See \`config.log' for more details" "$LINENO" 5; } | |
6722 | else | |
6723 | XCB_IMAGE_CFLAGS=$pkg_cv_XCB_IMAGE_CFLAGS | |
6724 | XCB_IMAGE_LIBS=$pkg_cv_XCB_IMAGE_LIBS | |
6725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6726 | $as_echo "yes" >&6; } | |
6727 | ||
6728 | fi | |
6729 | ||
6730 | pkg_failed=no | |
6731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_UTIL" >&5 | |
6732 | $as_echo_n "checking for XCB_UTIL... " >&6; } | |
6733 | ||
6734 | if test -n "$XCB_UTIL_CFLAGS"; then | |
6735 | pkg_cv_XCB_UTIL_CFLAGS="$XCB_UTIL_CFLAGS" | |
6736 | elif test -n "$PKG_CONFIG"; then | |
6737 | if test -n "$PKG_CONFIG" && \ | |
6738 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-event xcb-util xcb-atom\""; } >&5 | |
6739 | ($PKG_CONFIG --exists --print-errors "xcb-event xcb-util xcb-atom") 2>&5 | |
6740 | ac_status=$? | |
6741 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6742 | test $ac_status = 0; }; then | |
6743 | pkg_cv_XCB_UTIL_CFLAGS=`$PKG_CONFIG --cflags "xcb-event xcb-util xcb-atom" 2>/dev/null` | |
6744 | test "x$?" != "x0" && pkg_failed=yes | |
6745 | else | |
6746 | pkg_failed=yes | |
6747 | fi | |
6748 | else | |
6749 | pkg_failed=untried | |
6750 | fi | |
6751 | if test -n "$XCB_UTIL_LIBS"; then | |
6752 | pkg_cv_XCB_UTIL_LIBS="$XCB_UTIL_LIBS" | |
6753 | elif test -n "$PKG_CONFIG"; then | |
6754 | if test -n "$PKG_CONFIG" && \ | |
6755 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-event xcb-util xcb-atom\""; } >&5 | |
6756 | ($PKG_CONFIG --exists --print-errors "xcb-event xcb-util xcb-atom") 2>&5 | |
6757 | ac_status=$? | |
6758 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6759 | test $ac_status = 0; }; then | |
6760 | pkg_cv_XCB_UTIL_LIBS=`$PKG_CONFIG --libs "xcb-event xcb-util xcb-atom" 2>/dev/null` | |
6761 | test "x$?" != "x0" && pkg_failed=yes | |
6762 | else | |
6763 | pkg_failed=yes | |
6764 | fi | |
6765 | else | |
6766 | pkg_failed=untried | |
6767 | fi | |
6768 | ||
6769 | ||
6770 | ||
6771 | if test $pkg_failed = yes; then | |
6772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6773 | $as_echo "no" >&6; } | |
6774 | ||
6775 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
6776 | _pkg_short_errors_supported=yes | |
6777 | else | |
6778 | _pkg_short_errors_supported=no | |
6779 | fi | |
6780 | if test $_pkg_short_errors_supported = yes; then | |
6781 | XCB_UTIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb-event xcb-util xcb-atom" 2>&1` | |
6782 | else | |
6783 | XCB_UTIL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb-event xcb-util xcb-atom" 2>&1` | |
6784 | fi | |
6785 | # Put the nasty error message in config.log where it belongs | |
6786 | echo "$XCB_UTIL_PKG_ERRORS" >&5 | |
6787 | ||
6788 | as_fn_error $? "Package requirements (xcb-event xcb-util xcb-atom) were not met: | |
6789 | ||
6790 | $XCB_UTIL_PKG_ERRORS | |
6791 | ||
6792 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
6793 | installed software in a non-standard prefix. | |
6794 | ||
6795 | Alternatively, you may set the environment variables XCB_UTIL_CFLAGS | |
6796 | and XCB_UTIL_LIBS to avoid the need to call pkg-config. | |
6797 | See the pkg-config man page for more details." "$LINENO" 5 | |
6798 | elif test $pkg_failed = untried; then | |
6799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6800 | $as_echo "no" >&6; } | |
6801 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6802 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6803 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | |
6804 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
6805 | path to pkg-config. | |
6806 | ||
6807 | Alternatively, you may set the environment variables XCB_UTIL_CFLAGS | |
6808 | and XCB_UTIL_LIBS to avoid the need to call pkg-config. | |
6809 | See the pkg-config man page for more details. | |
6810 | ||
6811 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | |
6812 | See \`config.log' for more details" "$LINENO" 5; } | |
6813 | else | |
6814 | XCB_UTIL_CFLAGS=$pkg_cv_XCB_UTIL_CFLAGS | |
6815 | XCB_UTIL_LIBS=$pkg_cv_XCB_UTIL_LIBS | |
6816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6817 | $as_echo "yes" >&6; } | |
6818 | ||
6819 | fi | |
6820 | ||
6821 | pkg_failed=no | |
6822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_UTIL_XRM" >&5 | |
6823 | $as_echo_n "checking for XCB_UTIL_XRM... " >&6; } | |
6824 | ||
6825 | if test -n "$XCB_UTIL_XRM_CFLAGS"; then | |
6826 | pkg_cv_XCB_UTIL_XRM_CFLAGS="$XCB_UTIL_XRM_CFLAGS" | |
6827 | elif test -n "$PKG_CONFIG"; then | |
6828 | if test -n "$PKG_CONFIG" && \ | |
6829 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xrm\""; } >&5 | |
6830 | ($PKG_CONFIG --exists --print-errors "xcb-xrm") 2>&5 | |
6831 | ac_status=$? | |
6832 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6833 | test $ac_status = 0; }; then | |
6834 | pkg_cv_XCB_UTIL_XRM_CFLAGS=`$PKG_CONFIG --cflags "xcb-xrm" 2>/dev/null` | |
6835 | test "x$?" != "x0" && pkg_failed=yes | |
6836 | else | |
6837 | pkg_failed=yes | |
6838 | fi | |
6839 | else | |
6840 | pkg_failed=untried | |
6841 | fi | |
6842 | if test -n "$XCB_UTIL_XRM_LIBS"; then | |
6843 | pkg_cv_XCB_UTIL_XRM_LIBS="$XCB_UTIL_XRM_LIBS" | |
6844 | elif test -n "$PKG_CONFIG"; then | |
6845 | if test -n "$PKG_CONFIG" && \ | |
6846 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xrm\""; } >&5 | |
6847 | ($PKG_CONFIG --exists --print-errors "xcb-xrm") 2>&5 | |
6848 | ac_status=$? | |
6849 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6850 | test $ac_status = 0; }; then | |
6851 | pkg_cv_XCB_UTIL_XRM_LIBS=`$PKG_CONFIG --libs "xcb-xrm" 2>/dev/null` | |
6852 | test "x$?" != "x0" && pkg_failed=yes | |
6853 | else | |
6854 | pkg_failed=yes | |
6855 | fi | |
6856 | else | |
6857 | pkg_failed=untried | |
6858 | fi | |
6859 | ||
6860 | ||
6861 | ||
6862 | if test $pkg_failed = yes; then | |
6863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6864 | $as_echo "no" >&6; } | |
6865 | ||
6866 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
6867 | _pkg_short_errors_supported=yes | |
6868 | else | |
6869 | _pkg_short_errors_supported=no | |
6870 | fi | |
6871 | if test $_pkg_short_errors_supported = yes; then | |
6872 | XCB_UTIL_XRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb-xrm" 2>&1` | |
6873 | else | |
6874 | XCB_UTIL_XRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb-xrm" 2>&1` | |
6875 | fi | |
6876 | # Put the nasty error message in config.log where it belongs | |
6877 | echo "$XCB_UTIL_XRM_PKG_ERRORS" >&5 | |
6878 | ||
6879 | as_fn_error $? "Package requirements (xcb-xrm) were not met: | |
6880 | ||
6881 | $XCB_UTIL_XRM_PKG_ERRORS | |
6882 | ||
6883 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
6884 | installed software in a non-standard prefix. | |
6885 | ||
6886 | Alternatively, you may set the environment variables XCB_UTIL_XRM_CFLAGS | |
6887 | and XCB_UTIL_XRM_LIBS to avoid the need to call pkg-config. | |
6888 | See the pkg-config man page for more details." "$LINENO" 5 | |
6889 | elif test $pkg_failed = untried; then | |
6890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6891 | $as_echo "no" >&6; } | |
6892 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6893 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6894 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | |
6895 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
6896 | path to pkg-config. | |
6897 | ||
6898 | Alternatively, you may set the environment variables XCB_UTIL_XRM_CFLAGS | |
6899 | and XCB_UTIL_XRM_LIBS to avoid the need to call pkg-config. | |
6900 | See the pkg-config man page for more details. | |
6901 | ||
6902 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | |
6903 | See \`config.log' for more details" "$LINENO" 5; } | |
6904 | else | |
6905 | XCB_UTIL_XRM_CFLAGS=$pkg_cv_XCB_UTIL_XRM_CFLAGS | |
6906 | XCB_UTIL_XRM_LIBS=$pkg_cv_XCB_UTIL_XRM_LIBS | |
6907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6908 | $as_echo "yes" >&6; } | |
6909 | ||
6910 | fi | |
6911 | ||
6912 | pkg_failed=no | |
6913 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XKBCOMMON" >&5 | |
6914 | $as_echo_n "checking for XKBCOMMON... " >&6; } | |
6915 | ||
6916 | if test -n "$XKBCOMMON_CFLAGS"; then | |
6917 | pkg_cv_XKBCOMMON_CFLAGS="$XKBCOMMON_CFLAGS" | |
6918 | elif test -n "$PKG_CONFIG"; then | |
6919 | if test -n "$PKG_CONFIG" && \ | |
6920 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbcommon xkbcommon-x11\""; } >&5 | |
6921 | ($PKG_CONFIG --exists --print-errors "xkbcommon xkbcommon-x11") 2>&5 | |
6922 | ac_status=$? | |
6923 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6924 | test $ac_status = 0; }; then | |
6925 | pkg_cv_XKBCOMMON_CFLAGS=`$PKG_CONFIG --cflags "xkbcommon xkbcommon-x11" 2>/dev/null` | |
6926 | test "x$?" != "x0" && pkg_failed=yes | |
6927 | else | |
6928 | pkg_failed=yes | |
6929 | fi | |
6930 | else | |
6931 | pkg_failed=untried | |
6932 | fi | |
6933 | if test -n "$XKBCOMMON_LIBS"; then | |
6934 | pkg_cv_XKBCOMMON_LIBS="$XKBCOMMON_LIBS" | |
6935 | elif test -n "$PKG_CONFIG"; then | |
6936 | if test -n "$PKG_CONFIG" && \ | |
6937 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbcommon xkbcommon-x11\""; } >&5 | |
6938 | ($PKG_CONFIG --exists --print-errors "xkbcommon xkbcommon-x11") 2>&5 | |
6939 | ac_status=$? | |
6940 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6941 | test $ac_status = 0; }; then | |
6942 | pkg_cv_XKBCOMMON_LIBS=`$PKG_CONFIG --libs "xkbcommon xkbcommon-x11" 2>/dev/null` | |
6943 | test "x$?" != "x0" && pkg_failed=yes | |
6944 | else | |
6945 | pkg_failed=yes | |
6946 | fi | |
6947 | else | |
6948 | pkg_failed=untried | |
6949 | fi | |
6950 | ||
6951 | ||
6952 | ||
6953 | if test $pkg_failed = yes; then | |
6954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6955 | $as_echo "no" >&6; } | |
6956 | ||
6957 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
6958 | _pkg_short_errors_supported=yes | |
6959 | else | |
6960 | _pkg_short_errors_supported=no | |
6961 | fi | |
6962 | if test $_pkg_short_errors_supported = yes; then | |
6963 | XKBCOMMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xkbcommon xkbcommon-x11" 2>&1` | |
6964 | else | |
6965 | XKBCOMMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xkbcommon xkbcommon-x11" 2>&1` | |
6966 | fi | |
6967 | # Put the nasty error message in config.log where it belongs | |
6968 | echo "$XKBCOMMON_PKG_ERRORS" >&5 | |
6969 | ||
6970 | as_fn_error $? "Package requirements (xkbcommon xkbcommon-x11) were not met: | |
6971 | ||
6972 | $XKBCOMMON_PKG_ERRORS | |
6973 | ||
6974 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
6975 | installed software in a non-standard prefix. | |
6976 | ||
6977 | Alternatively, you may set the environment variables XKBCOMMON_CFLAGS | |
6978 | and XKBCOMMON_LIBS to avoid the need to call pkg-config. | |
6979 | See the pkg-config man page for more details." "$LINENO" 5 | |
6980 | elif test $pkg_failed = untried; then | |
6981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6982 | $as_echo "no" >&6; } | |
6983 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6984 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6985 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | |
6986 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
6987 | path to pkg-config. | |
6988 | ||
6989 | Alternatively, you may set the environment variables XKBCOMMON_CFLAGS | |
6990 | and XKBCOMMON_LIBS to avoid the need to call pkg-config. | |
6991 | See the pkg-config man page for more details. | |
6992 | ||
6993 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | |
6994 | See \`config.log' for more details" "$LINENO" 5; } | |
6995 | else | |
6996 | XKBCOMMON_CFLAGS=$pkg_cv_XKBCOMMON_CFLAGS | |
6997 | XKBCOMMON_LIBS=$pkg_cv_XKBCOMMON_LIBS | |
6998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6999 | $as_echo "yes" >&6; } | |
7000 | ||
7001 | fi | |
7002 | ||
7003 | pkg_failed=no | |
7004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 | |
7005 | $as_echo_n "checking for CAIRO... " >&6; } | |
7006 | ||
7007 | if test -n "$CAIRO_CFLAGS"; then | |
7008 | pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" | |
7009 | elif test -n "$PKG_CONFIG"; then | |
7010 | if test -n "$PKG_CONFIG" && \ | |
7011 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5 | |
7012 | ($PKG_CONFIG --exists --print-errors "cairo") 2>&5 | |
7013 | ac_status=$? | |
7014 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7015 | test $ac_status = 0; }; then | |
7016 | pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null` | |
7017 | test "x$?" != "x0" && pkg_failed=yes | |
7018 | else | |
7019 | pkg_failed=yes | |
7020 | fi | |
7021 | else | |
7022 | pkg_failed=untried | |
7023 | fi | |
7024 | if test -n "$CAIRO_LIBS"; then | |
7025 | pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" | |
7026 | elif test -n "$PKG_CONFIG"; then | |
7027 | if test -n "$PKG_CONFIG" && \ | |
7028 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5 | |
7029 | ($PKG_CONFIG --exists --print-errors "cairo") 2>&5 | |
7030 | ac_status=$? | |
7031 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7032 | test $ac_status = 0; }; then | |
7033 | pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 2>/dev/null` | |
7034 | test "x$?" != "x0" && pkg_failed=yes | |
7035 | else | |
7036 | pkg_failed=yes | |
7037 | fi | |
7038 | else | |
7039 | pkg_failed=untried | |
7040 | fi | |
7041 | ||
7042 | ||
7043 | ||
7044 | if test $pkg_failed = yes; then | |
7045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7046 | $as_echo "no" >&6; } | |
7047 | ||
7048 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
7049 | _pkg_short_errors_supported=yes | |
7050 | else | |
7051 | _pkg_short_errors_supported=no | |
7052 | fi | |
7053 | if test $_pkg_short_errors_supported = yes; then | |
7054 | CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cairo" 2>&1` | |
7055 | else | |
7056 | CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cairo" 2>&1` | |
7057 | fi | |
7058 | # Put the nasty error message in config.log where it belongs | |
7059 | echo "$CAIRO_PKG_ERRORS" >&5 | |
7060 | ||
7061 | as_fn_error $? "Package requirements (cairo) were not met: | |
7062 | ||
7063 | $CAIRO_PKG_ERRORS | |
7064 | ||
7065 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | |
7066 | installed software in a non-standard prefix. | |
7067 | ||
7068 | Alternatively, you may set the environment variables CAIRO_CFLAGS | |
7069 | and CAIRO_LIBS to avoid the need to call pkg-config. | |
7070 | See the pkg-config man page for more details." "$LINENO" 5 | |
7071 | elif test $pkg_failed = untried; then | |
7072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7073 | $as_echo "no" >&6; } | |
7074 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7075 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7076 | as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it | |
7077 | is in your PATH or set the PKG_CONFIG environment variable to the full | |
7078 | path to pkg-config. | |
7079 | ||
7080 | Alternatively, you may set the environment variables CAIRO_CFLAGS | |
7081 | and CAIRO_LIBS to avoid the need to call pkg-config. | |
7082 | See the pkg-config man page for more details. | |
7083 | ||
7084 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. | |
7085 | See \`config.log' for more details" "$LINENO" 5; } | |
7086 | else | |
7087 | CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS | |
7088 | CAIRO_LIBS=$pkg_cv_CAIRO_LIBS | |
7089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7090 | $as_echo "yes" >&6; } | |
7091 | ||
7092 | fi | |
7093 | ||
7094 | # Checks for programs. | |
7095 | for ac_prog in gawk mawk nawk awk | |
7096 | do | |
7097 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7098 | set dummy $ac_prog; ac_word=$2 | |
7099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7100 | $as_echo_n "checking for $ac_word... " >&6; } | |
7101 | if ${ac_cv_prog_AWK+:} false; then : | |
7102 | $as_echo_n "(cached) " >&6 | |
7103 | else | |
7104 | if test -n "$AWK"; then | |
7105 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7106 | else | |
7107 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7108 | for as_dir in $PATH | |
7109 | do | |
7110 | IFS=$as_save_IFS | |
7111 | test -z "$as_dir" && as_dir=. | |
7112 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7113 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7114 | ac_cv_prog_AWK="$ac_prog" | |
7115 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7116 | break 2 | |
7117 | fi | |
7118 | done | |
7119 | done | |
7120 | IFS=$as_save_IFS | |
7121 | ||
7122 | fi | |
7123 | fi | |
7124 | AWK=$ac_cv_prog_AWK | |
7125 | if test -n "$AWK"; then | |
7126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | |
7127 | $as_echo "$AWK" >&6; } | |
7128 | else | |
7129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7130 | $as_echo "no" >&6; } | |
7131 | fi | |
7132 | ||
7133 | ||
7134 | test -n "$AWK" && break | |
7135 | done | |
7136 | ||
7137 | ac_ext=c | |
7138 | ac_cpp='$CPP $CPPFLAGS' | |
7139 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7140 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7141 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
7143 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
7144 | # On Suns, sometimes $CPP names a directory. | |
7145 | if test -n "$CPP" && test -d "$CPP"; then | |
7146 | CPP= | |
7147 | fi | |
7148 | if test -z "$CPP"; then | |
7149 | if ${ac_cv_prog_CPP+:} false; then : | |
7150 | $as_echo_n "(cached) " >&6 | |
7151 | else | |
7152 | # Double quotes because CPP needs to be expanded | |
7153 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
7154 | do | |
7155 | ac_preproc_ok=false | |
7156 | for ac_c_preproc_warn_flag in '' yes | |
7157 | do | |
7158 | # Use a header file that comes with gcc, so configuring glibc | |
7159 | # with a fresh cross-compiler works. | |
7160 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
7161 | # <limits.h> exists even on freestanding compilers. | |
7162 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
7163 | # not just through cpp. "Syntax error" is here to catch this case. | |
7164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7165 | /* end confdefs.h. */ | |
7166 | #ifdef __STDC__ | |
7167 | # include <limits.h> | |
7168 | #else | |
7169 | # include <assert.h> | |
7170 | #endif | |
7171 | Syntax error | |
7172 | _ACEOF | |
7173 | if ac_fn_c_try_cpp "$LINENO"; then : | |
7174 | ||
7175 | else | |
7176 | # Broken: fails on valid input. | |
7177 | continue | |
7178 | fi | |
7179 | rm -f conftest.err conftest.i conftest.$ac_ext | |
7180 | ||
7181 | # OK, works on sane cases. Now check whether nonexistent headers | |
7182 | # can be detected and how. | |
7183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7184 | /* end confdefs.h. */ | |
7185 | #include <ac_nonexistent.h> | |
7186 | _ACEOF | |
7187 | if ac_fn_c_try_cpp "$LINENO"; then : | |
7188 | # Broken: success on invalid input. | |
7189 | continue | |
7190 | else | |
7191 | # Passes both tests. | |
7192 | ac_preproc_ok=: | |
7193 | break | |
7194 | fi | |
7195 | rm -f conftest.err conftest.i conftest.$ac_ext | |
7196 | ||
7197 | done | |
7198 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
7199 | rm -f conftest.i conftest.err conftest.$ac_ext | |
7200 | if $ac_preproc_ok; then : | |
7201 | break | |
7202 | fi | |
7203 | ||
7204 | done | |
7205 | ac_cv_prog_CPP=$CPP | |
7206 | ||
7207 | fi | |
7208 | CPP=$ac_cv_prog_CPP | |
7209 | else | |
7210 | ac_cv_prog_CPP=$CPP | |
7211 | fi | |
7212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
7213 | $as_echo "$CPP" >&6; } | |
7214 | ac_preproc_ok=false | |
7215 | for ac_c_preproc_warn_flag in '' yes | |
7216 | do | |
7217 | # Use a header file that comes with gcc, so configuring glibc | |
7218 | # with a fresh cross-compiler works. | |
7219 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
7220 | # <limits.h> exists even on freestanding compilers. | |
7221 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
7222 | # not just through cpp. "Syntax error" is here to catch this case. | |
7223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7224 | /* end confdefs.h. */ | |
7225 | #ifdef __STDC__ | |
7226 | # include <limits.h> | |
7227 | #else | |
7228 | # include <assert.h> | |
7229 | #endif | |
7230 | Syntax error | |
7231 | _ACEOF | |
7232 | if ac_fn_c_try_cpp "$LINENO"; then : | |
7233 | ||
7234 | else | |
7235 | # Broken: fails on valid input. | |
7236 | continue | |
7237 | fi | |
7238 | rm -f conftest.err conftest.i conftest.$ac_ext | |
7239 | ||
7240 | # OK, works on sane cases. Now check whether nonexistent headers | |
7241 | # can be detected and how. | |
7242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7243 | /* end confdefs.h. */ | |
7244 | #include <ac_nonexistent.h> | |
7245 | _ACEOF | |
7246 | if ac_fn_c_try_cpp "$LINENO"; then : | |
7247 | # Broken: success on invalid input. | |
7248 | continue | |
7249 | else | |
7250 | # Passes both tests. | |
7251 | ac_preproc_ok=: | |
7252 | break | |
7253 | fi | |
7254 | rm -f conftest.err conftest.i conftest.$ac_ext | |
7255 | ||
7256 | done | |
7257 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
7258 | rm -f conftest.i conftest.err conftest.$ac_ext | |
7259 | if $ac_preproc_ok; then : | |
7260 | ||
7261 | else | |
7262 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7263 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7264 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
7265 | See \`config.log' for more details" "$LINENO" 5; } | |
7266 | fi | |
7267 | ||
7268 | ac_ext=c | |
7269 | ac_cpp='$CPP $CPPFLAGS' | |
7270 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7271 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7272 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7273 | ||
7274 | ||
7275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
7276 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
7277 | set x ${MAKE-make} | |
7278 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
7279 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : | |
7280 | $as_echo_n "(cached) " >&6 | |
7281 | else | |
7282 | cat >conftest.make <<\_ACEOF | |
7283 | SHELL = /bin/sh | |
7284 | all: | |
7285 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
7286 | _ACEOF | |
7287 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
7288 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
7289 | *@@@%%%=?*=@@@%%%*) | |
7290 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
7291 | *) | |
7292 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
7293 | esac | |
7294 | rm -f conftest.make | |
7295 | fi | |
7296 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
7297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7298 | $as_echo "yes" >&6; } | |
7299 | SET_MAKE= | |
7300 | else | |
7301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7302 | $as_echo "no" >&6; } | |
7303 | SET_MAKE="MAKE=${MAKE-make}" | |
7304 | fi | |
7305 | ||
7306 | if test -n "$ac_tool_prefix"; then | |
7307 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7308 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7310 | $as_echo_n "checking for $ac_word... " >&6; } | |
7311 | if ${ac_cv_prog_RANLIB+:} false; then : | |
7312 | $as_echo_n "(cached) " >&6 | |
7313 | else | |
7314 | if test -n "$RANLIB"; then | |
7315 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7316 | else | |
7317 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7318 | for as_dir in $PATH | |
7319 | do | |
7320 | IFS=$as_save_IFS | |
7321 | test -z "$as_dir" && as_dir=. | |
7322 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7323 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7324 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7325 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7326 | break 2 | |
7327 | fi | |
7328 | done | |
7329 | done | |
7330 | IFS=$as_save_IFS | |
7331 | ||
7332 | fi | |
7333 | fi | |
7334 | RANLIB=$ac_cv_prog_RANLIB | |
7335 | if test -n "$RANLIB"; then | |
7336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
7337 | $as_echo "$RANLIB" >&6; } | |
7338 | else | |
7339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7340 | $as_echo "no" >&6; } | |
7341 | fi | |
7342 | ||
7343 | ||
7344 | fi | |
7345 | if test -z "$ac_cv_prog_RANLIB"; then | |
7346 | ac_ct_RANLIB=$RANLIB | |
7347 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7348 | set dummy ranlib; ac_word=$2 | |
7349 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7350 | $as_echo_n "checking for $ac_word... " >&6; } | |
7351 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : | |
7352 | $as_echo_n "(cached) " >&6 | |
7353 | else | |
7354 | if test -n "$ac_ct_RANLIB"; then | |
7355 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7356 | else | |
7357 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7358 | for as_dir in $PATH | |
7359 | do | |
7360 | IFS=$as_save_IFS | |
7361 | test -z "$as_dir" && as_dir=. | |
7362 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7363 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7364 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7365 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7366 | break 2 | |
7367 | fi | |
7368 | done | |
7369 | done | |
7370 | IFS=$as_save_IFS | |
7371 | ||
7372 | fi | |
7373 | fi | |
7374 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7375 | if test -n "$ac_ct_RANLIB"; then | |
7376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
7377 | $as_echo "$ac_ct_RANLIB" >&6; } | |
7378 | else | |
7379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7380 | $as_echo "no" >&6; } | |
7381 | fi | |
7382 | ||
7383 | if test "x$ac_ct_RANLIB" = x; then | |
7384 | RANLIB=":" | |
7385 | else | |
7386 | case $cross_compiling:$ac_tool_warned in | |
7387 | yes:) | |
7388 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7389 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7390 | ac_tool_warned=yes ;; | |
7391 | esac | |
7392 | RANLIB=$ac_ct_RANLIB | |
7393 | fi | |
7394 | else | |
7395 | RANLIB="$ac_cv_prog_RANLIB" | |
7396 | fi | |
7397 | ||
7398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 | |
7399 | $as_echo_n "checking whether ln -s works... " >&6; } | |
7400 | LN_S=$as_ln_s | |
7401 | if test "$LN_S" = "ln -s"; then | |
7402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7403 | $as_echo "yes" >&6; } | |
7404 | else | |
7405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 | |
7406 | $as_echo "no, using $LN_S" >&6; } | |
7407 | fi | |
7408 | ||
7409 | ||
7410 | if test -n "$ac_tool_prefix"; then | |
7411 | for ac_prog in ar lib "link -lib" | |
7412 | do | |
7413 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
7414 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
7415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7416 | $as_echo_n "checking for $ac_word... " >&6; } | |
7417 | if ${ac_cv_prog_AR+:} false; then : | |
7418 | $as_echo_n "(cached) " >&6 | |
7419 | else | |
7420 | if test -n "$AR"; then | |
7421 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7422 | else | |
7423 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7424 | for as_dir in $PATH | |
7425 | do | |
7426 | IFS=$as_save_IFS | |
7427 | test -z "$as_dir" && as_dir=. | |
7428 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7429 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7430 | ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | |
7431 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7432 | break 2 | |
7433 | fi | |
7434 | done | |
7435 | done | |
7436 | IFS=$as_save_IFS | |
7437 | ||
7438 | fi | |
7439 | fi | |
7440 | AR=$ac_cv_prog_AR | |
7441 | if test -n "$AR"; then | |
7442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
7443 | $as_echo "$AR" >&6; } | |
7444 | else | |
7445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7446 | $as_echo "no" >&6; } | |
7447 | fi | |
7448 | ||
7449 | ||
7450 | test -n "$AR" && break | |
7451 | done | |
7452 | fi | |
7453 | if test -z "$AR"; then | |
7454 | ac_ct_AR=$AR | |
7455 | for ac_prog in ar lib "link -lib" | |
7456 | do | |
7457 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7458 | set dummy $ac_prog; ac_word=$2 | |
7459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7460 | $as_echo_n "checking for $ac_word... " >&6; } | |
7461 | if ${ac_cv_prog_ac_ct_AR+:} false; then : | |
7462 | $as_echo_n "(cached) " >&6 | |
7463 | else | |
7464 | if test -n "$ac_ct_AR"; then | |
7465 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7466 | else | |
7467 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7468 | for as_dir in $PATH | |
7469 | do | |
7470 | IFS=$as_save_IFS | |
7471 | test -z "$as_dir" && as_dir=. | |
7472 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7473 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7474 | ac_cv_prog_ac_ct_AR="$ac_prog" | |
7475 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7476 | break 2 | |
7477 | fi | |
7478 | done | |
7479 | done | |
7480 | IFS=$as_save_IFS | |
7481 | ||
7482 | fi | |
7483 | fi | |
7484 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7485 | if test -n "$ac_ct_AR"; then | |
7486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
7487 | $as_echo "$ac_ct_AR" >&6; } | |
7488 | else | |
7489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7490 | $as_echo "no" >&6; } | |
7491 | fi | |
7492 | ||
7493 | ||
7494 | test -n "$ac_ct_AR" && break | |
7495 | done | |
7496 | ||
7497 | if test "x$ac_ct_AR" = x; then | |
7498 | AR="false" | |
7499 | else | |
7500 | case $cross_compiling:$ac_tool_warned in | |
7501 | yes:) | |
7502 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7503 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7504 | ac_tool_warned=yes ;; | |
7505 | esac | |
7506 | AR=$ac_ct_AR | |
7507 | fi | |
7508 | fi | |
7509 | ||
7510 | : ${AR=ar} | |
7511 | ||
7512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 | |
7513 | $as_echo_n "checking the archiver ($AR) interface... " >&6; } | |
7514 | if ${am_cv_ar_interface+:} false; then : | |
7515 | $as_echo_n "(cached) " >&6 | |
7516 | else | |
7517 | ac_ext=c | |
7518 | ac_cpp='$CPP $CPPFLAGS' | |
7519 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7520 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7521 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7522 | ||
7523 | am_cv_ar_interface=ar | |
7524 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7525 | /* end confdefs.h. */ | |
7526 | int some_variable = 0; | |
7527 | _ACEOF | |
7528 | if ac_fn_c_try_compile "$LINENO"; then : | |
7529 | am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' | |
7530 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 | |
7531 | (eval $am_ar_try) 2>&5 | |
7532 | ac_status=$? | |
7533 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7534 | test $ac_status = 0; } | |
7535 | if test "$ac_status" -eq 0; then | |
7536 | am_cv_ar_interface=ar | |
7537 | else | |
7538 | am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' | |
7539 | { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 | |
7540 | (eval $am_ar_try) 2>&5 | |
7541 | ac_status=$? | |
7542 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7543 | test $ac_status = 0; } | |
7544 | if test "$ac_status" -eq 0; then | |
7545 | am_cv_ar_interface=lib | |
7546 | else | |
7547 | am_cv_ar_interface=unknown | |
7548 | fi | |
7549 | fi | |
7550 | rm -f conftest.lib libconftest.a | |
7551 | ||
7552 | fi | |
7553 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7554 | ac_ext=c | |
7555 | ac_cpp='$CPP $CPPFLAGS' | |
7556 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7557 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7558 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7559 | ||
7560 | fi | |
7561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 | |
7562 | $as_echo "$am_cv_ar_interface" >&6; } | |
7563 | ||
7564 | case $am_cv_ar_interface in | |
7565 | ar) | |
7566 | ;; | |
7567 | lib) | |
7568 | # Microsoft lib, so override with the ar-lib wrapper script. | |
7569 | # FIXME: It is wrong to rewrite AR. | |
7570 | # But if we don't then we get into trouble of one sort or another. | |
7571 | # A longer-term fix would be to have automake use am__AR in this case, | |
7572 | # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something | |
7573 | # similar. | |
7574 | AR="$am_aux_dir/ar-lib $AR" | |
7575 | ;; | |
7576 | unknown) | |
7577 | as_fn_error $? "could not determine $AR interface" "$LINENO" 5 | |
7578 | ;; | |
7579 | esac | |
7580 | ||
7581 | ||
7582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for maximum warnings" >&5 | |
7583 | $as_echo_n "checking CFLAGS for maximum warnings... " >&6; } | |
7584 | if ${ac_cv_cflags_warn_all+:} false; then : | |
7585 | $as_echo_n "(cached) " >&6 | |
7586 | else | |
7587 | ac_cv_cflags_warn_all="no, unknown" | |
7588 | ac_save_CFLAGS="$CFLAGS" | |
7589 | for ac_arg in "-warn all % -warn all" "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" # | |
7590 | do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` | |
7591 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7592 | /* end confdefs.h. */ | |
7593 | ||
7594 | int | |
7595 | main () | |
7596 | { | |
7597 | ||
7598 | ; | |
7599 | return 0; | |
7600 | } | |
7601 | _ACEOF | |
7602 | if ac_fn_c_try_compile "$LINENO"; then : | |
7603 | ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break | |
7604 | fi | |
7605 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7606 | done | |
7607 | CFLAGS="$ac_save_CFLAGS" | |
7608 | ||
7609 | fi | |
7610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5 | |
7611 | $as_echo "$ac_cv_cflags_warn_all" >&6; } | |
7612 | ||
7613 | ||
7614 | case ".$ac_cv_cflags_warn_all" in | |
7615 | .ok|.ok,*) ;; | |
7616 | .|.no|.no,*) ;; | |
7617 | *) | |
7618 | if ${CFLAGS+:} false; then : | |
7619 | ||
7620 | case " $CFLAGS " in #( | |
7621 | *" $ac_cv_cflags_warn_all "*) : | |
7622 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$ac_cv_cflags_warn_all"; } >&5 | |
7623 | (: CFLAGS already contains $ac_cv_cflags_warn_all) 2>&5 | |
7624 | ac_status=$? | |
7625 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7626 | test $ac_status = 0; } ;; #( | |
7627 | *) : | |
7628 | ||
7629 | as_fn_append CFLAGS " $ac_cv_cflags_warn_all" | |
7630 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
7631 | (: CFLAGS="$CFLAGS") 2>&5 | |
7632 | ac_status=$? | |
7633 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7634 | test $ac_status = 0; } | |
7635 | ;; | |
7636 | esac | |
7637 | ||
7638 | else | |
7639 | ||
7640 | CFLAGS=$ac_cv_cflags_warn_all | |
7641 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
7642 | (: CFLAGS="$CFLAGS") 2>&5 | |
7643 | ac_status=$? | |
7644 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7645 | test $ac_status = 0; } | |
7646 | ||
7647 | fi | |
7648 | ;; | |
7649 | esac | |
7650 | ||
7651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunused-value" >&5 | |
7652 | $as_echo_n "checking whether C compiler accepts -Wunused-value... " >&6; } | |
7653 | if ${ax_cv_check_cflags___Wunused_value+:} false; then : | |
7654 | $as_echo_n "(cached) " >&6 | |
7655 | else | |
7656 | ||
7657 | ax_check_save_flags=$CFLAGS | |
7658 | CFLAGS="$CFLAGS -Wunused-value" | |
7659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7660 | /* end confdefs.h. */ | |
7661 | ||
7662 | int | |
7663 | main () | |
7664 | { | |
7665 | ||
7666 | ; | |
7667 | return 0; | |
7668 | } | |
7669 | _ACEOF | |
7670 | if ac_fn_c_try_compile "$LINENO"; then : | |
7671 | ax_cv_check_cflags___Wunused_value=yes | |
7672 | else | |
7673 | ax_cv_check_cflags___Wunused_value=no | |
7674 | fi | |
7675 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7676 | CFLAGS=$ax_check_save_flags | |
7677 | fi | |
7678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wunused_value" >&5 | |
7679 | $as_echo "$ax_cv_check_cflags___Wunused_value" >&6; } | |
7680 | if test "x$ax_cv_check_cflags___Wunused_value" = xyes; then : | |
7681 | ||
7682 | if ${AM_CFLAGS+:} false; then : | |
7683 | ||
7684 | case " $AM_CFLAGS " in #( | |
7685 | *" -Wunused-value "*) : | |
7686 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS already contains -Wunused-value"; } >&5 | |
7687 | (: AM_CFLAGS already contains -Wunused-value) 2>&5 | |
7688 | ac_status=$? | |
7689 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7690 | test $ac_status = 0; } ;; #( | |
7691 | *) : | |
7692 | ||
7693 | as_fn_append AM_CFLAGS " -Wunused-value" | |
7694 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS=\"\$AM_CFLAGS\""; } >&5 | |
7695 | (: AM_CFLAGS="$AM_CFLAGS") 2>&5 | |
7696 | ac_status=$? | |
7697 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7698 | test $ac_status = 0; } | |
7699 | ;; | |
7700 | esac | |
7701 | ||
7702 | else | |
7703 | ||
7704 | AM_CFLAGS=-Wunused-value | |
7705 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS=\"\$AM_CFLAGS\""; } >&5 | |
7706 | (: AM_CFLAGS="$AM_CFLAGS") 2>&5 | |
7707 | ac_status=$? | |
7708 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7709 | test $ac_status = 0; } | |
7710 | ||
7711 | fi | |
7712 | ||
7713 | else | |
7714 | : | |
7715 | fi | |
7716 | ||
7717 | ||
7718 | ||
7719 | # Checks for header files. | |
7720 | for ac_header in fcntl.h float.h inttypes.h limits.h locale.h netinet/in.h paths.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h | |
7721 | do : | |
7722 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7723 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
7724 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7725 | cat >>confdefs.h <<_ACEOF | |
7726 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7727 | _ACEOF | |
7728 | ||
7729 | else | |
7730 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7731 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7732 | as_fn_error $? "cannot find the $ac_header header, which i3lock requires | |
7733 | See \`config.log' for more details" "$LINENO" 5; } | |
7734 | fi | |
7735 | ||
7736 | done | |
7737 | ||
7738 | ||
7739 | ac_config_files="$ac_config_files Makefile" | |
7740 | ||
7741 | ||
7742 | # Enable address sanitizer for non-release builds. The performance hit is a | |
7743 | # 50% increase of wallclock time for the testsuite on my machine. | |
7744 | if test x$is_release = xyes; then | |
7745 | default_sanitizers= | |
7746 | else | |
7747 | default_sanitizers=address | |
7748 | fi | |
7749 | ||
7750 | ||
7751 | ||
7752 | ||
7753 | ||
7754 | ||
7755 | # Check whether --enable-sanitizers was given. | |
7756 | if test "${enable_sanitizers+set}" = set; then : | |
7757 | enableval=$enable_sanitizers; ax_sanitizers_default=$enableval | |
7758 | else | |
7759 | ax_sanitizers_default= | |
7760 | fi | |
7761 | ||
7762 | ax_enabled_sanitizers= | |
7763 | ||
7764 | if test "x$ax_sanitizers_default" = "x"; then : | |
7765 | ax_sanitizer_default= | |
7766 | for mycheck in $default_sanitizers; do | |
7767 | if test "x$mycheck" = "xaddress"; then : | |
7768 | ax_sanitizer_default=yes | |
7769 | fi | |
7770 | done | |
7771 | if test "x$ax_sanitizer_default" = "x"; then : | |
7772 | ax_sanitizer_default=no | |
7773 | fi | |
7774 | ||
7775 | else | |
7776 | ax_sanitizer_default=$ax_sanitizers_default | |
7777 | fi | |
7778 | # Check whether --enable-address-sanitizer was given. | |
7779 | if test "${enable_address_sanitizer+set}" = set; then : | |
7780 | enableval=$enable_address_sanitizer; ax_sanitizer_enabled=$enableval | |
7781 | else | |
7782 | ax_sanitizer_enabled=$ax_sanitizer_default | |
7783 | fi | |
7784 | ||
7785 | ||
7786 | if test "x$ax_sanitizer_enabled" = "xyes"; then : | |
7787 | ||
7788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=address" >&5 | |
7789 | $as_echo_n "checking whether C compiler accepts -fsanitize=address... " >&6; } | |
7790 | if ${ax_cv_check_cflags___fsanitize_address+:} false; then : | |
7791 | $as_echo_n "(cached) " >&6 | |
7792 | else | |
7793 | ||
7794 | ax_check_save_flags=$CFLAGS | |
7795 | CFLAGS="$CFLAGS -fsanitize=address" | |
7796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7797 | /* end confdefs.h. */ | |
7798 | ||
7799 | int | |
7800 | main () | |
7801 | { | |
7802 | ||
7803 | ; | |
7804 | return 0; | |
7805 | } | |
7806 | _ACEOF | |
7807 | if ac_fn_c_try_compile "$LINENO"; then : | |
7808 | ax_cv_check_cflags___fsanitize_address=yes | |
7809 | else | |
7810 | ax_cv_check_cflags___fsanitize_address=no | |
7811 | fi | |
7812 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7813 | CFLAGS=$ax_check_save_flags | |
7814 | fi | |
7815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_address" >&5 | |
7816 | $as_echo "$ax_cv_check_cflags___fsanitize_address" >&6; } | |
7817 | if test "x$ax_cv_check_cflags___fsanitize_address" = xyes; then : | |
7818 | ||
7819 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fsanitize=address" >&5 | |
7820 | $as_echo_n "checking whether the linker accepts -fsanitize=address... " >&6; } | |
7821 | if ${ax_cv_check_ldflags___fsanitize_address+:} false; then : | |
7822 | $as_echo_n "(cached) " >&6 | |
7823 | else | |
7824 | ||
7825 | ax_check_save_flags=$LDFLAGS | |
7826 | LDFLAGS="$LDFLAGS -fsanitize=address" | |
7827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7828 | /* end confdefs.h. */ | |
7829 | ||
7830 | int | |
7831 | main () | |
7832 | { | |
7833 | ||
7834 | ; | |
7835 | return 0; | |
7836 | } | |
7837 | _ACEOF | |
7838 | if ac_fn_c_try_link "$LINENO"; then : | |
7839 | ax_cv_check_ldflags___fsanitize_address=yes | |
7840 | else | |
7841 | ax_cv_check_ldflags___fsanitize_address=no | |
7842 | fi | |
7843 | rm -f core conftest.err conftest.$ac_objext \ | |
7844 | conftest$ac_exeext conftest.$ac_ext | |
7845 | LDFLAGS=$ax_check_save_flags | |
7846 | fi | |
7847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___fsanitize_address" >&5 | |
7848 | $as_echo "$ax_cv_check_ldflags___fsanitize_address" >&6; } | |
7849 | if test "x$ax_cv_check_ldflags___fsanitize_address" = xyes; then : | |
7850 | ||
7851 | ||
7852 | if ${CFLAGS+:} false; then : | |
7853 | ||
7854 | case " $CFLAGS " in #( | |
7855 | *" -fsanitize=address "*) : | |
7856 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -fsanitize=address"; } >&5 | |
7857 | (: CFLAGS already contains -fsanitize=address) 2>&5 | |
7858 | ac_status=$? | |
7859 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7860 | test $ac_status = 0; } ;; #( | |
7861 | *) : | |
7862 | ||
7863 | as_fn_append CFLAGS " -fsanitize=address" | |
7864 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
7865 | (: CFLAGS="$CFLAGS") 2>&5 | |
7866 | ac_status=$? | |
7867 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7868 | test $ac_status = 0; } | |
7869 | ;; | |
7870 | esac | |
7871 | ||
7872 | else | |
7873 | ||
7874 | CFLAGS=-fsanitize=address | |
7875 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
7876 | (: CFLAGS="$CFLAGS") 2>&5 | |
7877 | ac_status=$? | |
7878 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7879 | test $ac_status = 0; } | |
7880 | ||
7881 | fi | |
7882 | ||
7883 | ||
7884 | if ${LDFLAGS+:} false; then : | |
7885 | ||
7886 | case " $LDFLAGS " in #( | |
7887 | *" -fsanitize=address "*) : | |
7888 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -fsanitize=address"; } >&5 | |
7889 | (: LDFLAGS already contains -fsanitize=address) 2>&5 | |
7890 | ac_status=$? | |
7891 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7892 | test $ac_status = 0; } ;; #( | |
7893 | *) : | |
7894 | ||
7895 | as_fn_append LDFLAGS " -fsanitize=address" | |
7896 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 | |
7897 | (: LDFLAGS="$LDFLAGS") 2>&5 | |
7898 | ac_status=$? | |
7899 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7900 | test $ac_status = 0; } | |
7901 | ;; | |
7902 | esac | |
7903 | ||
7904 | else | |
7905 | ||
7906 | LDFLAGS=-fsanitize=address | |
7907 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 | |
7908 | (: LDFLAGS="$LDFLAGS") 2>&5 | |
7909 | ac_status=$? | |
7910 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7911 | test $ac_status = 0; } | |
7912 | ||
7913 | fi | |
7914 | ||
7915 | # -fno-omit-frame-pointer results in nicer stack traces in error | |
7916 | # messages, see http://clang.llvm.org/docs/AddressSanitizer.html#usage | |
7917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-omit-frame-pointer" >&5 | |
7918 | $as_echo_n "checking whether C compiler accepts -fno-omit-frame-pointer... " >&6; } | |
7919 | if ${ax_cv_check_cflags___fno_omit_frame_pointer+:} false; then : | |
7920 | $as_echo_n "(cached) " >&6 | |
7921 | else | |
7922 | ||
7923 | ax_check_save_flags=$CFLAGS | |
7924 | CFLAGS="$CFLAGS -fno-omit-frame-pointer" | |
7925 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7926 | /* end confdefs.h. */ | |
7927 | ||
7928 | int | |
7929 | main () | |
7930 | { | |
7931 | ||
7932 | ; | |
7933 | return 0; | |
7934 | } | |
7935 | _ACEOF | |
7936 | if ac_fn_c_try_compile "$LINENO"; then : | |
7937 | ax_cv_check_cflags___fno_omit_frame_pointer=yes | |
7938 | else | |
7939 | ax_cv_check_cflags___fno_omit_frame_pointer=no | |
7940 | fi | |
7941 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7942 | CFLAGS=$ax_check_save_flags | |
7943 | fi | |
7944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_omit_frame_pointer" >&5 | |
7945 | $as_echo "$ax_cv_check_cflags___fno_omit_frame_pointer" >&6; } | |
7946 | if test "x$ax_cv_check_cflags___fno_omit_frame_pointer" = xyes; then : | |
7947 | ||
7948 | ||
7949 | if ${CFLAGS+:} false; then : | |
7950 | ||
7951 | case " $CFLAGS " in #( | |
7952 | *" -fno-omit-frame-pointer "*) : | |
7953 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -fno-omit-frame-pointer"; } >&5 | |
7954 | (: CFLAGS already contains -fno-omit-frame-pointer) 2>&5 | |
7955 | ac_status=$? | |
7956 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7957 | test $ac_status = 0; } ;; #( | |
7958 | *) : | |
7959 | ||
7960 | as_fn_append CFLAGS " -fno-omit-frame-pointer" | |
7961 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
7962 | (: CFLAGS="$CFLAGS") 2>&5 | |
7963 | ac_status=$? | |
7964 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7965 | test $ac_status = 0; } | |
7966 | ;; | |
7967 | esac | |
7968 | ||
7969 | else | |
7970 | ||
7971 | CFLAGS=-fno-omit-frame-pointer | |
7972 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
7973 | (: CFLAGS="$CFLAGS") 2>&5 | |
7974 | ac_status=$? | |
7975 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7976 | test $ac_status = 0; } | |
7977 | ||
7978 | fi | |
7979 | ||
7980 | else | |
7981 | : | |
7982 | fi | |
7983 | ||
7984 | ||
7985 | $as_echo "#define I3LOCK_ASAN_ENABLED /**/" >>confdefs.h | |
7986 | ||
7987 | ax_enabled_sanitizers="address $ax_enabled_sanitizers" | |
7988 | ||
7989 | else | |
7990 | : | |
7991 | fi | |
7992 | ||
7993 | ||
7994 | else | |
7995 | : | |
7996 | fi | |
7997 | ||
7998 | ||
7999 | fi | |
8000 | ||
8001 | if test "x$ax_sanitizers_default" = "x"; then : | |
8002 | ax_sanitizer_default= | |
8003 | for mycheck in $default_sanitizers; do | |
8004 | if test "x$mycheck" = "xmemory"; then : | |
8005 | ax_sanitizer_default=yes | |
8006 | fi | |
8007 | done | |
8008 | if test "x$ax_sanitizer_default" = "x"; then : | |
8009 | ax_sanitizer_default=no | |
8010 | fi | |
8011 | ||
8012 | else | |
8013 | ax_sanitizer_default=$ax_sanitizers_default | |
8014 | fi | |
8015 | # Check whether --enable-memory-sanitizer was given. | |
8016 | if test "${enable_memory_sanitizer+set}" = set; then : | |
8017 | enableval=$enable_memory_sanitizer; ax_sanitizer_enabled=$enableval | |
8018 | else | |
8019 | ax_sanitizer_enabled=$ax_sanitizer_default | |
8020 | fi | |
8021 | ||
8022 | ||
8023 | if test "x$ax_sanitizer_enabled" = "xyes"; then : | |
8024 | ||
8025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=memory" >&5 | |
8026 | $as_echo_n "checking whether C compiler accepts -fsanitize=memory... " >&6; } | |
8027 | if ${ax_cv_check_cflags___fsanitize_memory+:} false; then : | |
8028 | $as_echo_n "(cached) " >&6 | |
8029 | else | |
8030 | ||
8031 | ax_check_save_flags=$CFLAGS | |
8032 | CFLAGS="$CFLAGS -fsanitize=memory" | |
8033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8034 | /* end confdefs.h. */ | |
8035 | ||
8036 | int | |
8037 | main () | |
8038 | { | |
8039 | ||
8040 | ; | |
8041 | return 0; | |
8042 | } | |
8043 | _ACEOF | |
8044 | if ac_fn_c_try_compile "$LINENO"; then : | |
8045 | ax_cv_check_cflags___fsanitize_memory=yes | |
8046 | else | |
8047 | ax_cv_check_cflags___fsanitize_memory=no | |
8048 | fi | |
8049 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8050 | CFLAGS=$ax_check_save_flags | |
8051 | fi | |
8052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_memory" >&5 | |
8053 | $as_echo "$ax_cv_check_cflags___fsanitize_memory" >&6; } | |
8054 | if test "x$ax_cv_check_cflags___fsanitize_memory" = xyes; then : | |
8055 | ||
8056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fsanitize=memory" >&5 | |
8057 | $as_echo_n "checking whether the linker accepts -fsanitize=memory... " >&6; } | |
8058 | if ${ax_cv_check_ldflags___fsanitize_memory+:} false; then : | |
8059 | $as_echo_n "(cached) " >&6 | |
8060 | else | |
8061 | ||
8062 | ax_check_save_flags=$LDFLAGS | |
8063 | LDFLAGS="$LDFLAGS -fsanitize=memory" | |
8064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8065 | /* end confdefs.h. */ | |
8066 | ||
8067 | int | |
8068 | main () | |
8069 | { | |
8070 | ||
8071 | ; | |
8072 | return 0; | |
8073 | } | |
8074 | _ACEOF | |
8075 | if ac_fn_c_try_link "$LINENO"; then : | |
8076 | ax_cv_check_ldflags___fsanitize_memory=yes | |
8077 | else | |
8078 | ax_cv_check_ldflags___fsanitize_memory=no | |
8079 | fi | |
8080 | rm -f core conftest.err conftest.$ac_objext \ | |
8081 | conftest$ac_exeext conftest.$ac_ext | |
8082 | LDFLAGS=$ax_check_save_flags | |
8083 | fi | |
8084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___fsanitize_memory" >&5 | |
8085 | $as_echo "$ax_cv_check_ldflags___fsanitize_memory" >&6; } | |
8086 | if test "x$ax_cv_check_ldflags___fsanitize_memory" = xyes; then : | |
8087 | ||
8088 | ||
8089 | if ${CFLAGS+:} false; then : | |
8090 | ||
8091 | case " $CFLAGS " in #( | |
8092 | *" -fsanitize=memory "*) : | |
8093 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -fsanitize=memory"; } >&5 | |
8094 | (: CFLAGS already contains -fsanitize=memory) 2>&5 | |
8095 | ac_status=$? | |
8096 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8097 | test $ac_status = 0; } ;; #( | |
8098 | *) : | |
8099 | ||
8100 | as_fn_append CFLAGS " -fsanitize=memory" | |
8101 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8102 | (: CFLAGS="$CFLAGS") 2>&5 | |
8103 | ac_status=$? | |
8104 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8105 | test $ac_status = 0; } | |
8106 | ;; | |
8107 | esac | |
8108 | ||
8109 | else | |
8110 | ||
8111 | CFLAGS=-fsanitize=memory | |
8112 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8113 | (: CFLAGS="$CFLAGS") 2>&5 | |
8114 | ac_status=$? | |
8115 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8116 | test $ac_status = 0; } | |
8117 | ||
8118 | fi | |
8119 | ||
8120 | ||
8121 | if ${LDFLAGS+:} false; then : | |
8122 | ||
8123 | case " $LDFLAGS " in #( | |
8124 | *" -fsanitize=memory "*) : | |
8125 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -fsanitize=memory"; } >&5 | |
8126 | (: LDFLAGS already contains -fsanitize=memory) 2>&5 | |
8127 | ac_status=$? | |
8128 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8129 | test $ac_status = 0; } ;; #( | |
8130 | *) : | |
8131 | ||
8132 | as_fn_append LDFLAGS " -fsanitize=memory" | |
8133 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 | |
8134 | (: LDFLAGS="$LDFLAGS") 2>&5 | |
8135 | ac_status=$? | |
8136 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8137 | test $ac_status = 0; } | |
8138 | ;; | |
8139 | esac | |
8140 | ||
8141 | else | |
8142 | ||
8143 | LDFLAGS=-fsanitize=memory | |
8144 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 | |
8145 | (: LDFLAGS="$LDFLAGS") 2>&5 | |
8146 | ac_status=$? | |
8147 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8148 | test $ac_status = 0; } | |
8149 | ||
8150 | fi | |
8151 | ||
8152 | # -fno-omit-frame-pointer results in nicer stack traces in error | |
8153 | # messages, see http://clang.llvm.org/docs/AddressSanitizer.html#usage | |
8154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-omit-frame-pointer" >&5 | |
8155 | $as_echo_n "checking whether C compiler accepts -fno-omit-frame-pointer... " >&6; } | |
8156 | if ${ax_cv_check_cflags___fno_omit_frame_pointer+:} false; then : | |
8157 | $as_echo_n "(cached) " >&6 | |
8158 | else | |
8159 | ||
8160 | ax_check_save_flags=$CFLAGS | |
8161 | CFLAGS="$CFLAGS -fno-omit-frame-pointer" | |
8162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8163 | /* end confdefs.h. */ | |
8164 | ||
8165 | int | |
8166 | main () | |
8167 | { | |
8168 | ||
8169 | ; | |
8170 | return 0; | |
8171 | } | |
8172 | _ACEOF | |
8173 | if ac_fn_c_try_compile "$LINENO"; then : | |
8174 | ax_cv_check_cflags___fno_omit_frame_pointer=yes | |
8175 | else | |
8176 | ax_cv_check_cflags___fno_omit_frame_pointer=no | |
8177 | fi | |
8178 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8179 | CFLAGS=$ax_check_save_flags | |
8180 | fi | |
8181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_omit_frame_pointer" >&5 | |
8182 | $as_echo "$ax_cv_check_cflags___fno_omit_frame_pointer" >&6; } | |
8183 | if test "x$ax_cv_check_cflags___fno_omit_frame_pointer" = xyes; then : | |
8184 | ||
8185 | ||
8186 | if ${CFLAGS+:} false; then : | |
8187 | ||
8188 | case " $CFLAGS " in #( | |
8189 | *" -fno-omit-frame-pointer "*) : | |
8190 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -fno-omit-frame-pointer"; } >&5 | |
8191 | (: CFLAGS already contains -fno-omit-frame-pointer) 2>&5 | |
8192 | ac_status=$? | |
8193 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8194 | test $ac_status = 0; } ;; #( | |
8195 | *) : | |
8196 | ||
8197 | as_fn_append CFLAGS " -fno-omit-frame-pointer" | |
8198 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8199 | (: CFLAGS="$CFLAGS") 2>&5 | |
8200 | ac_status=$? | |
8201 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8202 | test $ac_status = 0; } | |
8203 | ;; | |
8204 | esac | |
8205 | ||
8206 | else | |
8207 | ||
8208 | CFLAGS=-fno-omit-frame-pointer | |
8209 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8210 | (: CFLAGS="$CFLAGS") 2>&5 | |
8211 | ac_status=$? | |
8212 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8213 | test $ac_status = 0; } | |
8214 | ||
8215 | fi | |
8216 | ||
8217 | else | |
8218 | : | |
8219 | fi | |
8220 | ||
8221 | ||
8222 | $as_echo "#define I3LOCK_ASAN_ENABLED /**/" >>confdefs.h | |
8223 | ||
8224 | ax_enabled_sanitizers="memory $ax_enabled_sanitizers" | |
8225 | ||
8226 | else | |
8227 | : | |
8228 | fi | |
8229 | ||
8230 | ||
8231 | else | |
8232 | : | |
8233 | fi | |
8234 | ||
8235 | ||
8236 | fi | |
8237 | ||
8238 | if test "x$ax_sanitizers_default" = "x"; then : | |
8239 | ax_sanitizer_default= | |
8240 | for mycheck in $default_sanitizers; do | |
8241 | if test "x$mycheck" = "xundefined"; then : | |
8242 | ax_sanitizer_default=yes | |
8243 | fi | |
8244 | done | |
8245 | if test "x$ax_sanitizer_default" = "x"; then : | |
8246 | ax_sanitizer_default=no | |
8247 | fi | |
8248 | ||
8249 | else | |
8250 | ax_sanitizer_default=$ax_sanitizers_default | |
8251 | fi | |
8252 | # Check whether --enable-undefined-sanitizer was given. | |
8253 | if test "${enable_undefined_sanitizer+set}" = set; then : | |
8254 | enableval=$enable_undefined_sanitizer; ax_sanitizer_enabled=$enableval | |
8255 | else | |
8256 | ax_sanitizer_enabled=$ax_sanitizer_default | |
8257 | fi | |
8258 | ||
8259 | ||
8260 | if test "x$ax_sanitizer_enabled" = "xyes"; then : | |
8261 | ||
8262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=undefined" >&5 | |
8263 | $as_echo_n "checking whether C compiler accepts -fsanitize=undefined... " >&6; } | |
8264 | if ${ax_cv_check_cflags___fsanitize_undefined+:} false; then : | |
8265 | $as_echo_n "(cached) " >&6 | |
8266 | else | |
8267 | ||
8268 | ax_check_save_flags=$CFLAGS | |
8269 | CFLAGS="$CFLAGS -fsanitize=undefined" | |
8270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8271 | /* end confdefs.h. */ | |
8272 | ||
8273 | int | |
8274 | main () | |
8275 | { | |
8276 | ||
8277 | ; | |
8278 | return 0; | |
8279 | } | |
8280 | _ACEOF | |
8281 | if ac_fn_c_try_compile "$LINENO"; then : | |
8282 | ax_cv_check_cflags___fsanitize_undefined=yes | |
8283 | else | |
8284 | ax_cv_check_cflags___fsanitize_undefined=no | |
8285 | fi | |
8286 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8287 | CFLAGS=$ax_check_save_flags | |
8288 | fi | |
8289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_undefined" >&5 | |
8290 | $as_echo "$ax_cv_check_cflags___fsanitize_undefined" >&6; } | |
8291 | if test "x$ax_cv_check_cflags___fsanitize_undefined" = xyes; then : | |
8292 | ||
8293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fsanitize=undefined" >&5 | |
8294 | $as_echo_n "checking whether the linker accepts -fsanitize=undefined... " >&6; } | |
8295 | if ${ax_cv_check_ldflags___fsanitize_undefined+:} false; then : | |
8296 | $as_echo_n "(cached) " >&6 | |
8297 | else | |
8298 | ||
8299 | ax_check_save_flags=$LDFLAGS | |
8300 | LDFLAGS="$LDFLAGS -fsanitize=undefined" | |
8301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8302 | /* end confdefs.h. */ | |
8303 | ||
8304 | int | |
8305 | main () | |
8306 | { | |
8307 | ||
8308 | ; | |
8309 | return 0; | |
8310 | } | |
8311 | _ACEOF | |
8312 | if ac_fn_c_try_link "$LINENO"; then : | |
8313 | ax_cv_check_ldflags___fsanitize_undefined=yes | |
8314 | else | |
8315 | ax_cv_check_ldflags___fsanitize_undefined=no | |
8316 | fi | |
8317 | rm -f core conftest.err conftest.$ac_objext \ | |
8318 | conftest$ac_exeext conftest.$ac_ext | |
8319 | LDFLAGS=$ax_check_save_flags | |
8320 | fi | |
8321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___fsanitize_undefined" >&5 | |
8322 | $as_echo "$ax_cv_check_ldflags___fsanitize_undefined" >&6; } | |
8323 | if test "x$ax_cv_check_ldflags___fsanitize_undefined" = xyes; then : | |
8324 | ||
8325 | ||
8326 | if ${CFLAGS+:} false; then : | |
8327 | ||
8328 | case " $CFLAGS " in #( | |
8329 | *" -fsanitize=undefined "*) : | |
8330 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -fsanitize=undefined"; } >&5 | |
8331 | (: CFLAGS already contains -fsanitize=undefined) 2>&5 | |
8332 | ac_status=$? | |
8333 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8334 | test $ac_status = 0; } ;; #( | |
8335 | *) : | |
8336 | ||
8337 | as_fn_append CFLAGS " -fsanitize=undefined" | |
8338 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8339 | (: CFLAGS="$CFLAGS") 2>&5 | |
8340 | ac_status=$? | |
8341 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8342 | test $ac_status = 0; } | |
8343 | ;; | |
8344 | esac | |
8345 | ||
8346 | else | |
8347 | ||
8348 | CFLAGS=-fsanitize=undefined | |
8349 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8350 | (: CFLAGS="$CFLAGS") 2>&5 | |
8351 | ac_status=$? | |
8352 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8353 | test $ac_status = 0; } | |
8354 | ||
8355 | fi | |
8356 | ||
8357 | ||
8358 | if ${LDFLAGS+:} false; then : | |
8359 | ||
8360 | case " $LDFLAGS " in #( | |
8361 | *" -fsanitize=undefined "*) : | |
8362 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -fsanitize=undefined"; } >&5 | |
8363 | (: LDFLAGS already contains -fsanitize=undefined) 2>&5 | |
8364 | ac_status=$? | |
8365 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8366 | test $ac_status = 0; } ;; #( | |
8367 | *) : | |
8368 | ||
8369 | as_fn_append LDFLAGS " -fsanitize=undefined" | |
8370 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 | |
8371 | (: LDFLAGS="$LDFLAGS") 2>&5 | |
8372 | ac_status=$? | |
8373 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8374 | test $ac_status = 0; } | |
8375 | ;; | |
8376 | esac | |
8377 | ||
8378 | else | |
8379 | ||
8380 | LDFLAGS=-fsanitize=undefined | |
8381 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5 | |
8382 | (: LDFLAGS="$LDFLAGS") 2>&5 | |
8383 | ac_status=$? | |
8384 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8385 | test $ac_status = 0; } | |
8386 | ||
8387 | fi | |
8388 | ||
8389 | # -fno-omit-frame-pointer results in nicer stack traces in error | |
8390 | # messages, see http://clang.llvm.org/docs/AddressSanitizer.html#usage | |
8391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-omit-frame-pointer" >&5 | |
8392 | $as_echo_n "checking whether C compiler accepts -fno-omit-frame-pointer... " >&6; } | |
8393 | if ${ax_cv_check_cflags___fno_omit_frame_pointer+:} false; then : | |
8394 | $as_echo_n "(cached) " >&6 | |
8395 | else | |
8396 | ||
8397 | ax_check_save_flags=$CFLAGS | |
8398 | CFLAGS="$CFLAGS -fno-omit-frame-pointer" | |
8399 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8400 | /* end confdefs.h. */ | |
8401 | ||
8402 | int | |
8403 | main () | |
8404 | { | |
8405 | ||
8406 | ; | |
8407 | return 0; | |
8408 | } | |
8409 | _ACEOF | |
8410 | if ac_fn_c_try_compile "$LINENO"; then : | |
8411 | ax_cv_check_cflags___fno_omit_frame_pointer=yes | |
8412 | else | |
8413 | ax_cv_check_cflags___fno_omit_frame_pointer=no | |
8414 | fi | |
8415 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8416 | CFLAGS=$ax_check_save_flags | |
8417 | fi | |
8418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_omit_frame_pointer" >&5 | |
8419 | $as_echo "$ax_cv_check_cflags___fno_omit_frame_pointer" >&6; } | |
8420 | if test "x$ax_cv_check_cflags___fno_omit_frame_pointer" = xyes; then : | |
8421 | ||
8422 | ||
8423 | if ${CFLAGS+:} false; then : | |
8424 | ||
8425 | case " $CFLAGS " in #( | |
8426 | *" -fno-omit-frame-pointer "*) : | |
8427 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -fno-omit-frame-pointer"; } >&5 | |
8428 | (: CFLAGS already contains -fno-omit-frame-pointer) 2>&5 | |
8429 | ac_status=$? | |
8430 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8431 | test $ac_status = 0; } ;; #( | |
8432 | *) : | |
8433 | ||
8434 | as_fn_append CFLAGS " -fno-omit-frame-pointer" | |
8435 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8436 | (: CFLAGS="$CFLAGS") 2>&5 | |
8437 | ac_status=$? | |
8438 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8439 | test $ac_status = 0; } | |
8440 | ;; | |
8441 | esac | |
8442 | ||
8443 | else | |
8444 | ||
8445 | CFLAGS=-fno-omit-frame-pointer | |
8446 | { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5 | |
8447 | (: CFLAGS="$CFLAGS") 2>&5 | |
8448 | ac_status=$? | |
8449 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
8450 | test $ac_status = 0; } | |
8451 | ||
8452 | fi | |
8453 | ||
8454 | else | |
8455 | : | |
8456 | fi | |
8457 | ||
8458 | ||
8459 | $as_echo "#define I3LOCK_ASAN_ENABLED /**/" >>confdefs.h | |
8460 | ||
8461 | ax_enabled_sanitizers="undefined $ax_enabled_sanitizers" | |
8462 | ||
8463 | else | |
8464 | : | |
8465 | fi | |
8466 | ||
8467 | ||
8468 | else | |
8469 | : | |
8470 | fi | |
8471 | ||
8472 | ||
8473 | fi | |
8474 | ||
8475 | ||
8476 | cat >confcache <<\_ACEOF | |
8477 | # This file is a shell script that caches the results of configure | |
8478 | # tests run on this system so they can be shared between configure | |
8479 | # scripts and configure runs, see configure's option --config-cache. | |
8480 | # It is not useful on other systems. If it contains results you don't | |
8481 | # want to keep, you may remove or edit it. | |
8482 | # | |
8483 | # config.status only pays attention to the cache file if you give it | |
8484 | # the --recheck option to rerun configure. | |
8485 | # | |
8486 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
8487 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
8488 | # following values. | |
8489 | ||
8490 | _ACEOF | |
8491 | ||
8492 | # The following way of writing the cache mishandles newlines in values, | |
8493 | # but we know of no workaround that is simple, portable, and efficient. | |
8494 | # So, we kill variables containing newlines. | |
8495 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8496 | # and sets the high bit in the cache file unless we assign to the vars. | |
8497 | ( | |
8498 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
8499 | eval ac_val=\$$ac_var | |
8500 | case $ac_val in #( | |
8501 | *${as_nl}*) | |
8502 | case $ac_var in #( | |
8503 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
8504 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
8505 | esac | |
8506 | case $ac_var in #( | |
8507 | _ | IFS | as_nl) ;; #( | |
8508 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
8509 | *) { eval $ac_var=; unset $ac_var;} ;; | |
8510 | esac ;; | |
8511 | esac | |
8512 | done | |
8513 | ||
8514 | (set) 2>&1 | | |
8515 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
8516 | *${as_nl}ac_space=\ *) | |
8517 | # `set' does not quote correctly, so add quotes: double-quote | |
8518 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
8519 | sed -n \ | |
8520 | "s/'/'\\\\''/g; | |
8521 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
8522 | ;; #( | |
8523 | *) | |
8524 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8525 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
8526 | ;; | |
8527 | esac | | |
8528 | sort | |
8529 | ) | | |
8530 | sed ' | |
8531 | /^ac_cv_env_/b end | |
8532 | t clear | |
8533 | :clear | |
8534 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
8535 | t end | |
8536 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
8537 | :end' >>confcache | |
8538 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
8539 | if test -w "$cache_file"; then | |
8540 | if test "x$cache_file" != "x/dev/null"; then | |
8541 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
8542 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
8543 | if test ! -f "$cache_file" || test -h "$cache_file"; then | |
8544 | cat confcache >"$cache_file" | |
8545 | else | |
8546 | case $cache_file in #( | |
8547 | */* | ?:*) | |
8548 | mv -f confcache "$cache_file"$$ && | |
8549 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
8550 | *) | |
8551 | mv -f confcache "$cache_file" ;; | |
8552 | esac | |
8553 | fi | |
8554 | fi | |
8555 | else | |
8556 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
8557 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
8558 | fi | |
8559 | fi | |
8560 | rm -f confcache | |
8561 | ||
8562 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
8563 | # Let make expand exec_prefix. | |
8564 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
8565 | ||
8566 | DEFS=-DHAVE_CONFIG_H | |
8567 | ||
8568 | ac_libobjs= | |
8569 | ac_ltlibobjs= | |
8570 | U= | |
8571 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
8572 | # 1. Remove the extension, and $U if already installed. | |
8573 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
8574 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
8575 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
8576 | # will be set to the directory where LIBOBJS objects are built. | |
8577 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
8578 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
8579 | done | |
8580 | LIBOBJS=$ac_libobjs | |
8581 | ||
8582 | LTLIBOBJS=$ac_ltlibobjs | |
8583 | ||
8584 | ||
8585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 | |
8586 | $as_echo_n "checking that generated files are newer than configure... " >&6; } | |
8587 | if test -n "$am_sleep_pid"; then | |
8588 | # Hide warnings about reused PIDs. | |
8589 | wait $am_sleep_pid 2>/dev/null | |
8590 | fi | |
8591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 | |
8592 | $as_echo "done" >&6; } | |
8593 | if test -n "$EXEEXT"; then | |
8594 | am__EXEEXT_TRUE= | |
8595 | am__EXEEXT_FALSE='#' | |
8596 | else | |
8597 | am__EXEEXT_TRUE='#' | |
8598 | am__EXEEXT_FALSE= | |
8599 | fi | |
8600 | ||
8601 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then | |
8602 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. | |
8603 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
8604 | fi | |
8605 | if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then | |
8606 | as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined. | |
8607 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
8608 | fi | |
8609 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | |
8610 | as_fn_error $? "conditional \"AMDEP\" was never defined. | |
8611 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
8612 | fi | |
8613 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
8614 | as_fn_error $? "conditional \"am__fastdepCC\" was never defined. | |
8615 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
8616 | fi | |
8617 | ||
8618 | : "${CONFIG_STATUS=./config.status}" | |
8619 | ac_write_fail=0 | |
8620 | ac_clean_files_save=$ac_clean_files | |
8621 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
8622 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
8623 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
8624 | as_write_fail=0 | |
8625 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
8626 | #! $SHELL | |
8627 | # Generated by $as_me. | |
8628 | # Run this file to recreate the current configuration. | |
8629 | # Compiler output produced by configure, useful for debugging | |
8630 | # configure, is in config.log if it exists. | |
8631 | ||
8632 | debug=false | |
8633 | ac_cs_recheck=false | |
8634 | ac_cs_silent=false | |
8635 | ||
8636 | SHELL=\${CONFIG_SHELL-$SHELL} | |
8637 | export SHELL | |
8638 | _ASEOF | |
8639 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
8640 | ## -------------------- ## | |
8641 | ## M4sh Initialization. ## | |
8642 | ## -------------------- ## | |
8643 | ||
8644 | # Be more Bourne compatible | |
8645 | DUALCASE=1; export DUALCASE # for MKS sh | |
8646 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
8647 | emulate sh | |
8648 | NULLCMD=: | |
8649 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
8650 | # is contrary to our usage. Disable this feature. | |
8651 | alias -g '${1+"$@"}'='"$@"' | |
8652 | setopt NO_GLOB_SUBST | |
8653 | else | |
8654 | case `(set -o) 2>/dev/null` in #( | |
8655 | *posix*) : | |
8656 | set -o posix ;; #( | |
8657 | *) : | |
8658 | ;; | |
8659 | esac | |
8660 | fi | |
8661 | ||
8662 | ||
8663 | as_nl=' | |
8664 | ' | |
8665 | export as_nl | |
8666 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
8667 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
8668 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
8669 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
8670 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
8671 | # but without wasting forks for bash or zsh. | |
8672 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
8673 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
8674 | as_echo='print -r --' | |
8675 | as_echo_n='print -rn --' | |
8676 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
8677 | as_echo='printf %s\n' | |
8678 | as_echo_n='printf %s' | |
8679 | else | |
8680 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
8681 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
8682 | as_echo_n='/usr/ucb/echo -n' | |
8683 | else | |
8684 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
8685 | as_echo_n_body='eval | |
8686 | arg=$1; | |
8687 | case $arg in #( | |
8688 | *"$as_nl"*) | |
8689 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
8690 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
8691 | esac; | |
8692 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
8693 | ' | |
8694 | export as_echo_n_body | |
8695 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
8696 | fi | |
8697 | export as_echo_body | |
8698 | as_echo='sh -c $as_echo_body as_echo' | |
8699 | fi | |
8700 | ||
8701 | # The user is always right. | |
8702 | if test "${PATH_SEPARATOR+set}" != set; then | |
8703 | PATH_SEPARATOR=: | |
8704 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
8705 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
8706 | PATH_SEPARATOR=';' | |
8707 | } | |
8708 | fi | |
8709 | ||
8710 | ||
8711 | # IFS | |
8712 | # We need space, tab and new line, in precisely that order. Quoting is | |
8713 | # there to prevent editors from complaining about space-tab. | |
8714 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
8715 | # splitting by setting IFS to empty value.) | |
8716 | IFS=" "" $as_nl" | |
8717 | ||
8718 | # Find who we are. Look in the path if we contain no directory separator. | |
8719 | as_myself= | |
8720 | case $0 in #(( | |
8721 | *[\\/]* ) as_myself=$0 ;; | |
8722 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8723 | for as_dir in $PATH | |
8724 | do | |
8725 | IFS=$as_save_IFS | |
8726 | test -z "$as_dir" && as_dir=. | |
8727 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
8728 | done | |
8729 | IFS=$as_save_IFS | |
8730 | ||
8731 | ;; | |
8732 | esac | |
8733 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
8734 | # in which case we are not to be found in the path. | |
8735 | if test "x$as_myself" = x; then | |
8736 | as_myself=$0 | |
8737 | fi | |
8738 | if test ! -f "$as_myself"; then | |
8739 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
8740 | exit 1 | |
8741 | fi | |
8742 | ||
8743 | # Unset variables that we do not need and which cause bugs (e.g. in | |
8744 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
8745 | # suppresses any "Segmentation fault" message there. '((' could | |
8746 | # trigger a bug in pdksh 5.2.14. | |
8747 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
8748 | do eval test x\${$as_var+set} = xset \ | |
8749 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
8750 | done | |
8751 | PS1='$ ' | |
8752 | PS2='> ' | |
8753 | PS4='+ ' | |
8754 | ||
8755 | # NLS nuisances. | |
8756 | LC_ALL=C | |
8757 | export LC_ALL | |
8758 | LANGUAGE=C | |
8759 | export LANGUAGE | |
8760 | ||
8761 | # CDPATH. | |
8762 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
8763 | ||
8764 | ||
8765 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
8766 | # ---------------------------------------- | |
8767 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
8768 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
8769 | # script with STATUS, using 1 if that was 0. | |
8770 | as_fn_error () | |
8771 | { | |
8772 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
8773 | if test "$4"; then | |
8774 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
8775 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
8776 | fi | |
8777 | $as_echo "$as_me: error: $2" >&2 | |
8778 | as_fn_exit $as_status | |
8779 | } # as_fn_error | |
8780 | ||
8781 | ||
8782 | # as_fn_set_status STATUS | |
8783 | # ----------------------- | |
8784 | # Set $? to STATUS, without forking. | |
8785 | as_fn_set_status () | |
8786 | { | |
8787 | return $1 | |
8788 | } # as_fn_set_status | |
8789 | ||
8790 | # as_fn_exit STATUS | |
8791 | # ----------------- | |
8792 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
8793 | as_fn_exit () | |
8794 | { | |
8795 | set +e | |
8796 | as_fn_set_status $1 | |
8797 | exit $1 | |
8798 | } # as_fn_exit | |
8799 | ||
8800 | # as_fn_unset VAR | |
8801 | # --------------- | |
8802 | # Portably unset VAR. | |
8803 | as_fn_unset () | |
8804 | { | |
8805 | { eval $1=; unset $1;} | |
8806 | } | |
8807 | as_unset=as_fn_unset | |
8808 | # as_fn_append VAR VALUE | |
8809 | # ---------------------- | |
8810 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
8811 | # advantage of any shell optimizations that allow amortized linear growth over | |
8812 | # repeated appends, instead of the typical quadratic growth present in naive | |
8813 | # implementations. | |
8814 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
8815 | eval 'as_fn_append () | |
8816 | { | |
8817 | eval $1+=\$2 | |
8818 | }' | |
8819 | else | |
8820 | as_fn_append () | |
8821 | { | |
8822 | eval $1=\$$1\$2 | |
8823 | } | |
8824 | fi # as_fn_append | |
8825 | ||
8826 | # as_fn_arith ARG... | |
8827 | # ------------------ | |
8828 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
8829 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
8830 | # must be portable across $(()) and expr. | |
8831 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
8832 | eval 'as_fn_arith () | |
8833 | { | |
8834 | as_val=$(( $* )) | |
8835 | }' | |
8836 | else | |
8837 | as_fn_arith () | |
8838 | { | |
8839 | as_val=`expr "$@" || test $? -eq 1` | |
8840 | } | |
8841 | fi # as_fn_arith | |
8842 | ||
8843 | ||
8844 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
8845 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
8846 | as_expr=expr | |
8847 | else | |
8848 | as_expr=false | |
8849 | fi | |
8850 | ||
8851 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
8852 | as_basename=basename | |
8853 | else | |
8854 | as_basename=false | |
8855 | fi | |
8856 | ||
8857 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
8858 | as_dirname=dirname | |
8859 | else | |
8860 | as_dirname=false | |
8861 | fi | |
8862 | ||
8863 | as_me=`$as_basename -- "$0" || | |
8864 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
8865 | X"$0" : 'X\(//\)$' \| \ | |
8866 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
8867 | $as_echo X/"$0" | | |
8868 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
8869 | s//\1/ | |
8870 | q | |
8871 | } | |
8872 | /^X\/\(\/\/\)$/{ | |
8873 | s//\1/ | |
8874 | q | |
8875 | } | |
8876 | /^X\/\(\/\).*/{ | |
8877 | s//\1/ | |
8878 | q | |
8879 | } | |
8880 | s/.*/./; q'` | |
8881 | ||
8882 | # Avoid depending upon Character Ranges. | |
8883 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
8884 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
8885 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
8886 | as_cr_digits='0123456789' | |
8887 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
8888 | ||
8889 | ECHO_C= ECHO_N= ECHO_T= | |
8890 | case `echo -n x` in #((((( | |
8891 | -n*) | |
8892 | case `echo 'xy\c'` in | |
8893 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
8894 | xy) ECHO_C='\c';; | |
8895 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
8896 | ECHO_T=' ';; | |
8897 | esac;; | |
8898 | *) | |
8899 | ECHO_N='-n';; | |
8900 | esac | |
8901 | ||
8902 | rm -f conf$$ conf$$.exe conf$$.file | |
8903 | if test -d conf$$.dir; then | |
8904 | rm -f conf$$.dir/conf$$.file | |
8905 | else | |
8906 | rm -f conf$$.dir | |
8907 | mkdir conf$$.dir 2>/dev/null | |
8908 | fi | |
8909 | if (echo >conf$$.file) 2>/dev/null; then | |
8910 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
8911 | as_ln_s='ln -s' | |
8912 | # ... but there are two gotchas: | |
8913 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
8914 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
8915 | # In both cases, we have to default to `cp -pR'. | |
8916 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
8917 | as_ln_s='cp -pR' | |
8918 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
8919 | as_ln_s=ln | |
8920 | else | |
8921 | as_ln_s='cp -pR' | |
8922 | fi | |
8923 | else | |
8924 | as_ln_s='cp -pR' | |
8925 | fi | |
8926 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
8927 | rmdir conf$$.dir 2>/dev/null | |
8928 | ||
8929 | ||
8930 | # as_fn_mkdir_p | |
8931 | # ------------- | |
8932 | # Create "$as_dir" as a directory, including parents if necessary. | |
8933 | as_fn_mkdir_p () | |
8934 | { | |
8935 | ||
8936 | case $as_dir in #( | |
8937 | -*) as_dir=./$as_dir;; | |
8938 | esac | |
8939 | test -d "$as_dir" || eval $as_mkdir_p || { | |
8940 | as_dirs= | |
8941 | while :; do | |
8942 | case $as_dir in #( | |
8943 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
8944 | *) as_qdir=$as_dir;; | |
8945 | esac | |
8946 | as_dirs="'$as_qdir' $as_dirs" | |
8947 | as_dir=`$as_dirname -- "$as_dir" || | |
8948 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
8949 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
8950 | X"$as_dir" : 'X\(//\)$' \| \ | |
8951 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
8952 | $as_echo X"$as_dir" | | |
8953 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
8954 | s//\1/ | |
8955 | q | |
8956 | } | |
8957 | /^X\(\/\/\)[^/].*/{ | |
8958 | s//\1/ | |
8959 | q | |
8960 | } | |
8961 | /^X\(\/\/\)$/{ | |
8962 | s//\1/ | |
8963 | q | |
8964 | } | |
8965 | /^X\(\/\).*/{ | |
8966 | s//\1/ | |
8967 | q | |
8968 | } | |
8969 | s/.*/./; q'` | |
8970 | test -d "$as_dir" && break | |
8971 | done | |
8972 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
8973 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
8974 | ||
8975 | ||
8976 | } # as_fn_mkdir_p | |
8977 | if mkdir -p . 2>/dev/null; then | |
8978 | as_mkdir_p='mkdir -p "$as_dir"' | |
8979 | else | |
8980 | test -d ./-p && rmdir ./-p | |
8981 | as_mkdir_p=false | |
8982 | fi | |
8983 | ||
8984 | ||
8985 | # as_fn_executable_p FILE | |
8986 | # ----------------------- | |
8987 | # Test if FILE is an executable regular file. | |
8988 | as_fn_executable_p () | |
8989 | { | |
8990 | test -f "$1" && test -x "$1" | |
8991 | } # as_fn_executable_p | |
8992 | as_test_x='test -x' | |
8993 | as_executable_p=as_fn_executable_p | |
8994 | ||
8995 | # Sed expression to map a string onto a valid CPP name. | |
8996 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
8997 | ||
8998 | # Sed expression to map a string onto a valid variable name. | |
8999 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
9000 | ||
9001 | ||
9002 | exec 6>&1 | |
9003 | ## ----------------------------------- ## | |
9004 | ## Main body of $CONFIG_STATUS script. ## | |
9005 | ## ----------------------------------- ## | |
9006 | _ASEOF | |
9007 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
9008 | ||
9009 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9010 | # Save the log message, to keep $0 and so on meaningful, and to | |
9011 | # report actual input values of CONFIG_FILES etc. instead of their | |
9012 | # values after options handling. | |
9013 | ac_log=" | |
9014 | This file was extended by i3lock $as_me 2.13, which was | |
9015 | generated by GNU Autoconf 2.69. Invocation command line was | |
9016 | ||
9017 | CONFIG_FILES = $CONFIG_FILES | |
9018 | CONFIG_HEADERS = $CONFIG_HEADERS | |
9019 | CONFIG_LINKS = $CONFIG_LINKS | |
9020 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
9021 | $ $0 $@ | |
9022 | ||
9023 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
9024 | " | |
9025 | ||
9026 | _ACEOF | |
9027 | ||
9028 | case $ac_config_files in *" | |
9029 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
9030 | esac | |
9031 | ||
9032 | case $ac_config_headers in *" | |
9033 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
9034 | esac | |
9035 | ||
9036 | ||
9037 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9038 | # Files that config.status was made for. | |
9039 | config_files="$ac_config_files" | |
9040 | config_headers="$ac_config_headers" | |
9041 | config_commands="$ac_config_commands" | |
9042 | ||
9043 | _ACEOF | |
9044 | ||
9045 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9046 | ac_cs_usage="\ | |
9047 | \`$as_me' instantiates files and other configuration actions | |
9048 | from templates according to the current configuration. Unless the files | |
9049 | and actions are specified as TAGs, all are instantiated by default. | |
9050 | ||
9051 | Usage: $0 [OPTION]... [TAG]... | |
9052 | ||
9053 | -h, --help print this help, then exit | |
9054 | -V, --version print version number and configuration settings, then exit | |
9055 | --config print configuration, then exit | |
9056 | -q, --quiet, --silent | |
9057 | do not print progress messages | |
9058 | -d, --debug don't remove temporary files | |
9059 | --recheck update $as_me by reconfiguring in the same conditions | |
9060 | --file=FILE[:TEMPLATE] | |
9061 | instantiate the configuration file FILE | |
9062 | --header=FILE[:TEMPLATE] | |
9063 | instantiate the configuration header FILE | |
9064 | ||
9065 | Configuration files: | |
9066 | $config_files | |
9067 | ||
9068 | Configuration headers: | |
9069 | $config_headers | |
9070 | ||
9071 | Configuration commands: | |
9072 | $config_commands | |
9073 | ||
9074 | Report bugs to <https://github.com/i3/i3lock/issues>." | |
9075 | ||
9076 | _ACEOF | |
9077 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9078 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | |
9079 | ac_cs_version="\\ | |
9080 | i3lock config.status 2.13 | |
9081 | configured by $0, generated by GNU Autoconf 2.69, | |
9082 | with options \\"\$ac_cs_config\\" | |
9083 | ||
9084 | Copyright (C) 2012 Free Software Foundation, Inc. | |
9085 | This config.status script is free software; the Free Software Foundation | |
9086 | gives unlimited permission to copy, distribute and modify it." | |
9087 | ||
9088 | ac_pwd='$ac_pwd' | |
9089 | srcdir='$srcdir' | |
9090 | INSTALL='$INSTALL' | |
9091 | MKDIR_P='$MKDIR_P' | |
9092 | AWK='$AWK' | |
9093 | test -n "\$AWK" || AWK=awk | |
9094 | _ACEOF | |
9095 | ||
9096 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9097 | # The default lists apply if the user does not specify any file. | |
9098 | ac_need_defaults=: | |
9099 | while test $# != 0 | |
9100 | do | |
9101 | case $1 in | |
9102 | --*=?*) | |
9103 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
9104 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
9105 | ac_shift=: | |
9106 | ;; | |
9107 | --*=) | |
9108 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
9109 | ac_optarg= | |
9110 | ac_shift=: | |
9111 | ;; | |
9112 | *) | |
9113 | ac_option=$1 | |
9114 | ac_optarg=$2 | |
9115 | ac_shift=shift | |
9116 | ;; | |
9117 | esac | |
9118 | ||
9119 | case $ac_option in | |
9120 | # Handling of the options. | |
9121 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9122 | ac_cs_recheck=: ;; | |
9123 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
9124 | $as_echo "$ac_cs_version"; exit ;; | |
9125 | --config | --confi | --conf | --con | --co | --c ) | |
9126 | $as_echo "$ac_cs_config"; exit ;; | |
9127 | --debug | --debu | --deb | --de | --d | -d ) | |
9128 | debug=: ;; | |
9129 | --file | --fil | --fi | --f ) | |
9130 | $ac_shift | |
9131 | case $ac_optarg in | |
9132 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
9133 | '') as_fn_error $? "missing file argument" ;; | |
9134 | esac | |
9135 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
9136 | ac_need_defaults=false;; | |
9137 | --header | --heade | --head | --hea ) | |
9138 | $ac_shift | |
9139 | case $ac_optarg in | |
9140 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
9141 | esac | |
9142 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
9143 | ac_need_defaults=false;; | |
9144 | --he | --h) | |
9145 | # Conflict between --help and --header | |
9146 | as_fn_error $? "ambiguous option: \`$1' | |
9147 | Try \`$0 --help' for more information.";; | |
9148 | --help | --hel | -h ) | |
9149 | $as_echo "$ac_cs_usage"; exit ;; | |
9150 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
9151 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
9152 | ac_cs_silent=: ;; | |
9153 | ||
9154 | # This is an error. | |
9155 | -*) as_fn_error $? "unrecognized option: \`$1' | |
9156 | Try \`$0 --help' for more information." ;; | |
9157 | ||
9158 | *) as_fn_append ac_config_targets " $1" | |
9159 | ac_need_defaults=false ;; | |
9160 | ||
9161 | esac | |
9162 | shift | |
9163 | done | |
9164 | ||
9165 | ac_configure_extra_args= | |
9166 | ||
9167 | if $ac_cs_silent; then | |
9168 | exec 6>/dev/null | |
9169 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
9170 | fi | |
9171 | ||
9172 | _ACEOF | |
9173 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9174 | if \$ac_cs_recheck; then | |
9175 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
9176 | shift | |
9177 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
9178 | CONFIG_SHELL='$SHELL' | |
9179 | export CONFIG_SHELL | |
9180 | exec "\$@" | |
9181 | fi | |
9182 | ||
9183 | _ACEOF | |
9184 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9185 | exec 5>>config.log | |
9186 | { | |
9187 | echo | |
9188 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
9189 | ## Running $as_me. ## | |
9190 | _ASBOX | |
9191 | $as_echo "$ac_log" | |
9192 | } >&5 | |
9193 | ||
9194 | _ACEOF | |
9195 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9196 | # | |
9197 | # INIT-COMMANDS | |
9198 | # | |
9199 | ax_enable_builddir_srcdir="$srcdir" # $srcdir | |
9200 | ax_enable_builddir_host="$HOST" # $HOST / $host | |
9201 | ax_enable_builddir_version="$VERSION" # $VERSION | |
9202 | ax_enable_builddir_package="$PACKAGE" # $PACKAGE | |
9203 | ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX | |
9204 | ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED | |
9205 | ax_enable_builddir="$ax_enable_builddir" # $SUB | |
9206 | ||
9207 | AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" | |
9208 | ||
9209 | _ACEOF | |
9210 | ||
9211 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9212 | ||
9213 | # Handling of arguments. | |
9214 | for ac_config_target in $ac_config_targets | |
9215 | do | |
9216 | case $ac_config_target in | |
9217 | "buildir") CONFIG_COMMANDS="$CONFIG_COMMANDS buildir" ;; | |
9218 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; | |
9219 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
9220 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
9221 | ||
9222 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
9223 | esac | |
9224 | done | |
9225 | ||
9226 | ||
9227 | # If the user did not use the arguments to specify the items to instantiate, | |
9228 | # then the envvar interface is used. Set only those that are not. | |
9229 | # We use the long form for the default assignment because of an extremely | |
9230 | # bizarre bug on SunOS 4.1.3. | |
9231 | if $ac_need_defaults; then | |
9232 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
9233 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
9234 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
9235 | fi | |
9236 | ||
9237 | # Have a temporary directory for convenience. Make it in the build tree | |
9238 | # simply because there is no reason against having it here, and in addition, | |
9239 | # creating and moving files from /tmp can sometimes cause problems. | |
9240 | # Hook for its removal unless debugging. | |
9241 | # Note that there is a small window in which the directory will not be cleaned: | |
9242 | # after its creation but before its name has been assigned to `$tmp'. | |
9243 | $debug || | |
9244 | { | |
9245 | tmp= ac_tmp= | |
9246 | trap 'exit_status=$? | |
9247 | : "${ac_tmp:=$tmp}" | |
9248 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
9249 | ' 0 | |
9250 | trap 'as_fn_exit 1' 1 2 13 15 | |
9251 | } | |
9252 | # Create a (secure) tmp directory for tmp files. | |
9253 | ||
9254 | { | |
9255 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
9256 | test -d "$tmp" | |
9257 | } || | |
9258 | { | |
9259 | tmp=./conf$$-$RANDOM | |
9260 | (umask 077 && mkdir "$tmp") | |
9261 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 | |
9262 | ac_tmp=$tmp | |
9263 | ||
9264 | # Set up the scripts for CONFIG_FILES section. | |
9265 | # No need to generate them if there are no CONFIG_FILES. | |
9266 | # This happens for instance with `./config.status config.h'. | |
9267 | if test -n "$CONFIG_FILES"; then | |
9268 | ||
9269 | ||
9270 | ac_cr=`echo X | tr X '\015'` | |
9271 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
9272 | # But we know of no other shell where ac_cr would be empty at this | |
9273 | # point, so we can use a bashism as a fallback. | |
9274 | if test "x$ac_cr" = x; then | |
9275 | eval ac_cr=\$\'\\r\' | |
9276 | fi | |
9277 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
9278 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
9279 | ac_cs_awk_cr='\\r' | |
9280 | else | |
9281 | ac_cs_awk_cr=$ac_cr | |
9282 | fi | |
9283 | ||
9284 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && | |
9285 | _ACEOF | |
9286 | ||
9287 | ||
9288 | { | |
9289 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
9290 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
9291 | echo "_ACEOF" | |
9292 | } >conf$$subs.sh || | |
9293 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
9294 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
9295 | ac_delim='%!_!# ' | |
9296 | for ac_last_try in false false false false false :; do | |
9297 | . ./conf$$subs.sh || | |
9298 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
9299 | ||
9300 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
9301 | if test $ac_delim_n = $ac_delim_num; then | |
9302 | break | |
9303 | elif $ac_last_try; then | |
9304 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
9305 | else | |
9306 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
9307 | fi | |
9308 | done | |
9309 | rm -f conf$$subs.sh | |
9310 | ||
9311 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9312 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && | |
9313 | _ACEOF | |
9314 | sed -n ' | |
9315 | h | |
9316 | s/^/S["/; s/!.*/"]=/ | |
9317 | p | |
9318 | g | |
9319 | s/^[^!]*!// | |
9320 | :repl | |
9321 | t repl | |
9322 | s/'"$ac_delim"'$// | |
9323 | t delim | |
9324 | :nl | |
9325 | h | |
9326 | s/\(.\{148\}\)..*/\1/ | |
9327 | t more1 | |
9328 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
9329 | p | |
9330 | n | |
9331 | b repl | |
9332 | :more1 | |
9333 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
9334 | p | |
9335 | g | |
9336 | s/.\{148\}// | |
9337 | t nl | |
9338 | :delim | |
9339 | h | |
9340 | s/\(.\{148\}\)..*/\1/ | |
9341 | t more2 | |
9342 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
9343 | p | |
9344 | b | |
9345 | :more2 | |
9346 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
9347 | p | |
9348 | g | |
9349 | s/.\{148\}// | |
9350 | t delim | |
9351 | ' <conf$$subs.awk | sed ' | |
9352 | /^[^""]/{ | |
9353 | N | |
9354 | s/\n// | |
9355 | } | |
9356 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
9357 | rm -f conf$$subs.awk | |
9358 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9359 | _ACAWK | |
9360 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && | |
9361 | for (key in S) S_is_set[key] = 1 | |
9362 | FS = "" | |
9363 | ||
9364 | } | |
9365 | { | |
9366 | line = $ 0 | |
9367 | nfields = split(line, field, "@") | |
9368 | substed = 0 | |
9369 | len = length(field[1]) | |
9370 | for (i = 2; i < nfields; i++) { | |
9371 | key = field[i] | |
9372 | keylen = length(key) | |
9373 | if (S_is_set[key]) { | |
9374 | value = S[key] | |
9375 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
9376 | len += length(value) + length(field[++i]) | |
9377 | substed = 1 | |
9378 | } else | |
9379 | len += 1 + keylen | |
9380 | } | |
9381 | ||
9382 | print line | |
9383 | } | |
9384 | ||
9385 | _ACAWK | |
9386 | _ACEOF | |
9387 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9388 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
9389 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
9390 | else | |
9391 | cat | |
9392 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ | |
9393 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
9394 | _ACEOF | |
9395 | ||
9396 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), | |
9397 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
9398 | # trailing colons and then remove the whole line if VPATH becomes empty | |
9399 | # (actually we leave an empty line to preserve line numbers). | |
9400 | if test "x$srcdir" = x.; then | |
9401 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ | |
9402 | h | |
9403 | s/// | |
9404 | s/^/:/ | |
9405 | s/[ ]*$/:/ | |
9406 | s/:\$(srcdir):/:/g | |
9407 | s/:\${srcdir}:/:/g | |
9408 | s/:@srcdir@:/:/g | |
9409 | s/^:*// | |
9410 | s/:*$// | |
9411 | x | |
9412 | s/\(=[ ]*\).*/\1/ | |
9413 | G | |
9414 | s/\n// | |
9415 | s/^[^=]*=[ ]*$// | |
9416 | }' | |
9417 | fi | |
9418 | ||
9419 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9420 | fi # test -n "$CONFIG_FILES" | |
9421 | ||
9422 | # Set up the scripts for CONFIG_HEADERS section. | |
9423 | # No need to generate them if there are no CONFIG_HEADERS. | |
9424 | # This happens for instance with `./config.status Makefile'. | |
9425 | if test -n "$CONFIG_HEADERS"; then | |
9426 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || | |
9427 | BEGIN { | |
9428 | _ACEOF | |
9429 | ||
9430 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
9431 | # here-document in config.status, that substitutes the proper values into | |
9432 | # config.h.in to produce config.h. | |
9433 | ||
9434 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
9435 | # handling of long lines. | |
9436 | ac_delim='%!_!# ' | |
9437 | for ac_last_try in false false :; do | |
9438 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` | |
9439 | if test -z "$ac_tt"; then | |
9440 | break | |
9441 | elif $ac_last_try; then | |
9442 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
9443 | else | |
9444 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
9445 | fi | |
9446 | done | |
9447 | ||
9448 | # For the awk script, D is an array of macro values keyed by name, | |
9449 | # likewise P contains macro parameters if any. Preserve backslash | |
9450 | # newline sequences. | |
9451 | ||
9452 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
9453 | sed -n ' | |
9454 | s/.\{148\}/&'"$ac_delim"'/g | |
9455 | t rset | |
9456 | :rset | |
9457 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
9458 | t def | |
9459 | d | |
9460 | :def | |
9461 | s/\\$// | |
9462 | t bsnl | |
9463 | s/["\\]/\\&/g | |
9464 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
9465 | D["\1"]=" \3"/p | |
9466 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
9467 | d | |
9468 | :bsnl | |
9469 | s/["\\]/\\&/g | |
9470 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
9471 | D["\1"]=" \3\\\\\\n"\\/p | |
9472 | t cont | |
9473 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
9474 | t cont | |
9475 | d | |
9476 | :cont | |
9477 | n | |
9478 | s/.\{148\}/&'"$ac_delim"'/g | |
9479 | t clear | |
9480 | :clear | |
9481 | s/\\$// | |
9482 | t bsnlc | |
9483 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
9484 | d | |
9485 | :bsnlc | |
9486 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
9487 | b cont | |
9488 | ' <confdefs.h | sed ' | |
9489 | s/'"$ac_delim"'/"\\\ | |
9490 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
9491 | ||
9492 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9493 | for (key in D) D_is_set[key] = 1 | |
9494 | FS = "" | |
9495 | } | |
9496 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
9497 | line = \$ 0 | |
9498 | split(line, arg, " ") | |
9499 | if (arg[1] == "#") { | |
9500 | defundef = arg[2] | |
9501 | mac1 = arg[3] | |
9502 | } else { | |
9503 | defundef = substr(arg[1], 2) | |
9504 | mac1 = arg[2] | |
9505 | } | |
9506 | split(mac1, mac2, "(") #) | |
9507 | macro = mac2[1] | |
9508 | prefix = substr(line, 1, index(line, defundef) - 1) | |
9509 | if (D_is_set[macro]) { | |
9510 | # Preserve the white space surrounding the "#". | |
9511 | print prefix "define", macro P[macro] D[macro] | |
9512 | next | |
9513 | } else { | |
9514 | # Replace #undef with comments. This is necessary, for example, | |
9515 | # in the case of _POSIX_SOURCE, which is predefined and required | |
9516 | # on some systems where configure will not decide to define it. | |
9517 | if (defundef == "undef") { | |
9518 | print "/*", prefix defundef, macro, "*/" | |
9519 | next | |
9520 | } | |
9521 | } | |
9522 | } | |
9523 | { print } | |
9524 | _ACAWK | |
9525 | _ACEOF | |
9526 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9527 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 | |
9528 | fi # test -n "$CONFIG_HEADERS" | |
9529 | ||
9530 | ||
9531 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
9532 | shift | |
9533 | for ac_tag | |
9534 | do | |
9535 | case $ac_tag in | |
9536 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
9537 | esac | |
9538 | case $ac_mode$ac_tag in | |
9539 | :[FHL]*:*);; | |
9540 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
9541 | :[FH]-) ac_tag=-:-;; | |
9542 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
9543 | esac | |
9544 | ac_save_IFS=$IFS | |
9545 | IFS=: | |
9546 | set x $ac_tag | |
9547 | IFS=$ac_save_IFS | |
9548 | shift | |
9549 | ac_file=$1 | |
9550 | shift | |
9551 | ||
9552 | case $ac_mode in | |
9553 | :L) ac_source=$1;; | |
9554 | :[FH]) | |
9555 | ac_file_inputs= | |
9556 | for ac_f | |
9557 | do | |
9558 | case $ac_f in | |
9559 | -) ac_f="$ac_tmp/stdin";; | |
9560 | *) # Look for the file first in the build tree, then in the source tree | |
9561 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
9562 | # because $ac_f cannot contain `:'. | |
9563 | test -f "$ac_f" || | |
9564 | case $ac_f in | |
9565 | [\\/$]*) false;; | |
9566 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
9567 | esac || | |
9568 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
9569 | esac | |
9570 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
9571 | as_fn_append ac_file_inputs " '$ac_f'" | |
9572 | done | |
9573 | ||
9574 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
9575 | # use $as_me), people would be surprised to read: | |
9576 | # /* config.h. Generated by config.status. */ | |
9577 | configure_input='Generated from '` | |
9578 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
9579 | `' by configure.' | |
9580 | if test x"$ac_file" != x-; then | |
9581 | configure_input="$ac_file. $configure_input" | |
9582 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
9583 | $as_echo "$as_me: creating $ac_file" >&6;} | |
9584 | fi | |
9585 | # Neutralize special characters interpreted by sed in replacement strings. | |
9586 | case $configure_input in #( | |
9587 | *\&* | *\|* | *\\* ) | |
9588 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
9589 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
9590 | *) ac_sed_conf_input=$configure_input;; | |
9591 | esac | |
9592 | ||
9593 | case $ac_tag in | |
9594 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ | |
9595 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
9596 | esac | |
9597 | ;; | |
9598 | esac | |
9599 | ||
9600 | ac_dir=`$as_dirname -- "$ac_file" || | |
9601 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
9602 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
9603 | X"$ac_file" : 'X\(//\)$' \| \ | |
9604 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
9605 | $as_echo X"$ac_file" | | |
9606 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
9607 | s//\1/ | |
9608 | q | |
9609 | } | |
9610 | /^X\(\/\/\)[^/].*/{ | |
9611 | s//\1/ | |
9612 | q | |
9613 | } | |
9614 | /^X\(\/\/\)$/{ | |
9615 | s//\1/ | |
9616 | q | |
9617 | } | |
9618 | /^X\(\/\).*/{ | |
9619 | s//\1/ | |
9620 | q | |
9621 | } | |
9622 | s/.*/./; q'` | |
9623 | as_dir="$ac_dir"; as_fn_mkdir_p | |
9624 | ac_builddir=. | |
9625 | ||
9626 | case "$ac_dir" in | |
9627 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
9628 | *) | |
9629 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
9630 | # A ".." for each directory in $ac_dir_suffix. | |
9631 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
9632 | case $ac_top_builddir_sub in | |
9633 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
9634 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
9635 | esac ;; | |
9636 | esac | |
9637 | ac_abs_top_builddir=$ac_pwd | |
9638 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
9639 | # for backward compatibility: | |
9640 | ac_top_builddir=$ac_top_build_prefix | |
9641 | ||
9642 | case $srcdir in | |
9643 | .) # We are building in place. | |
9644 | ac_srcdir=. | |
9645 | ac_top_srcdir=$ac_top_builddir_sub | |
9646 | ac_abs_top_srcdir=$ac_pwd ;; | |
9647 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
9648 | ac_srcdir=$srcdir$ac_dir_suffix; | |
9649 | ac_top_srcdir=$srcdir | |
9650 | ac_abs_top_srcdir=$srcdir ;; | |
9651 | *) # Relative name. | |
9652 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
9653 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
9654 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
9655 | esac | |
9656 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
9657 | ||
9658 | ||
9659 | case $ac_mode in | |
9660 | :F) | |
9661 | # | |
9662 | # CONFIG_FILE | |
9663 | # | |
9664 | ||
9665 | case $INSTALL in | |
9666 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
9667 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
9668 | esac | |
9669 | ac_MKDIR_P=$MKDIR_P | |
9670 | case $MKDIR_P in | |
9671 | [\\/$]* | ?:[\\/]* ) ;; | |
9672 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
9673 | esac | |
9674 | _ACEOF | |
9675 | ||
9676 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9677 | # If the template does not know about datarootdir, expand it. | |
9678 | # FIXME: This hack should be removed a few years after 2.60. | |
9679 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
9680 | ac_sed_dataroot=' | |
9681 | /datarootdir/ { | |
9682 | p | |
9683 | q | |
9684 | } | |
9685 | /@datadir@/p | |
9686 | /@docdir@/p | |
9687 | /@infodir@/p | |
9688 | /@localedir@/p | |
9689 | /@mandir@/p' | |
9690 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
9691 | *datarootdir*) ac_datarootdir_seen=yes;; | |
9692 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
9693 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
9694 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
9695 | _ACEOF | |
9696 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9697 | ac_datarootdir_hack=' | |
9698 | s&@datadir@&$datadir&g | |
9699 | s&@docdir@&$docdir&g | |
9700 | s&@infodir@&$infodir&g | |
9701 | s&@localedir@&$localedir&g | |
9702 | s&@mandir@&$mandir&g | |
9703 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
9704 | esac | |
9705 | _ACEOF | |
9706 | ||
9707 | # Neutralize VPATH when `$srcdir' = `.'. | |
9708 | # Shell code in configure.ac might set extrasub. | |
9709 | # FIXME: do we really want to maintain this feature? | |
9710 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9711 | ac_sed_extra="$ac_vpsub | |
9712 | $extrasub | |
9713 | _ACEOF | |
9714 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
9715 | :t | |
9716 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
9717 | s|@configure_input@|$ac_sed_conf_input|;t t | |
9718 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
9719 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
9720 | s&@srcdir@&$ac_srcdir&;t t | |
9721 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
9722 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
9723 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
9724 | s&@builddir@&$ac_builddir&;t t | |
9725 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
9726 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
9727 | s&@INSTALL@&$ac_INSTALL&;t t | |
9728 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
9729 | $ac_datarootdir_hack | |
9730 | " | |
9731 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ | |
9732 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
9733 | ||
9734 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
9735 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && | |
9736 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
9737 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
9738 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
9739 | which seems to be undefined. Please make sure it is defined" >&5 | |
9740 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
9741 | which seems to be undefined. Please make sure it is defined" >&2;} | |
9742 | ||
9743 | rm -f "$ac_tmp/stdin" | |
9744 | case $ac_file in | |
9745 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; | |
9746 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
9747 | esac \ | |
9748 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
9749 | ;; | |
9750 | :H) | |
9751 | # | |
9752 | # CONFIG_HEADER | |
9753 | # | |
9754 | if test x"$ac_file" != x-; then | |
9755 | { | |
9756 | $as_echo "/* $configure_input */" \ | |
9757 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" | |
9758 | } >"$ac_tmp/config.h" \ | |
9759 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
9760 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
9761 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
9762 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
9763 | else | |
9764 | rm -f "$ac_file" | |
9765 | mv "$ac_tmp/config.h" "$ac_file" \ | |
9766 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
9767 | fi | |
9768 | else | |
9769 | $as_echo "/* $configure_input */" \ | |
9770 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ | |
9771 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
9772 | fi | |
9773 | # Compute "$ac_file"'s index in $config_headers. | |
9774 | _am_arg="$ac_file" | |
9775 | _am_stamp_count=1 | |
9776 | for _am_header in $config_headers :; do | |
9777 | case $_am_header in | |
9778 | $_am_arg | $_am_arg:* ) | |
9779 | break ;; | |
9780 | * ) | |
9781 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
9782 | esac | |
9783 | done | |
9784 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || | |
9785 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
9786 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
9787 | X"$_am_arg" : 'X\(//\)$' \| \ | |
9788 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
9789 | $as_echo X"$_am_arg" | | |
9790 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
9791 | s//\1/ | |
9792 | q | |
9793 | } | |
9794 | /^X\(\/\/\)[^/].*/{ | |
9795 | s//\1/ | |
9796 | q | |
9797 | } | |
9798 | /^X\(\/\/\)$/{ | |
9799 | s//\1/ | |
9800 | q | |
9801 | } | |
9802 | /^X\(\/\).*/{ | |
9803 | s//\1/ | |
9804 | q | |
9805 | } | |
9806 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
9807 | ;; | |
9808 | ||
9809 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
9810 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
9811 | ;; | |
9812 | esac | |
9813 | ||
9814 | ||
9815 | case $ac_file$ac_mode in | |
9816 | "buildir":C) ac_top_srcdir="$ax_enable_builddir_srcdir" | |
9817 | if test ".$ax_enable_builddir" = ".." ; then | |
9818 | if test -f "$top_srcdir/Makefile" ; then | |
9819 | { $as_echo "$as_me:${as_lineno-$LINENO}: skipping top_srcdir/Makefile - left untouched" >&5 | |
9820 | $as_echo "$as_me: skipping top_srcdir/Makefile - left untouched" >&6;} | |
9821 | else | |
9822 | { $as_echo "$as_me:${as_lineno-$LINENO}: skipping top_srcdir/Makefile - not created" >&5 | |
9823 | $as_echo "$as_me: skipping top_srcdir/Makefile - not created" >&6;} | |
9824 | fi | |
9825 | else | |
9826 | if test -f "$ac_top_srcdir/Makefile" ; then | |
9827 | a=`grep "^VERSION " "$ac_top_srcdir/Makefile"` ; b=`grep "^VERSION " Makefile` | |
9828 | test "$a" != "$b" && rm "$ac_top_srcdir/Makefile" | |
9829 | fi | |
9830 | if test -f "$ac_top_srcdir/Makefile" ; then | |
9831 | echo "$ac_top_srcdir/Makefile : $ac_top_srcdir/Makefile.in" > $tmp/conftemp.mk | |
9832 | echo " @ echo 'REMOVED,,,' >\$@" >> $tmp/conftemp.mk | |
9833 | eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null" | |
9834 | if grep '^REMOVED,,,' "$ac_top_srcdir/Makefile" >/dev/null | |
9835 | then rm $ac_top_srcdir/Makefile ; fi | |
9836 | cp $tmp/conftemp.mk $ac_top_srcdir/makefiles.mk~ ## DEBUGGING | |
9837 | fi | |
9838 | if test ! -f "$ac_top_srcdir/Makefile" ; then | |
9839 | { $as_echo "$as_me:${as_lineno-$LINENO}: create top_srcdir/Makefile guessed from local Makefile" >&5 | |
9840 | $as_echo "$as_me: create top_srcdir/Makefile guessed from local Makefile" >&6;} | |
9841 | x='`' ; cat >$tmp/conftemp.sed <<_EOF | |
9842 | /^\$/n | |
9843 | x | |
9844 | /^\$/bS | |
9845 | x | |
9846 | /\\\\\$/{H;d;} | |
9847 | {H;s/.*//;x;} | |
9848 | bM | |
9849 | :S | |
9850 | x | |
9851 | /\\\\\$/{h;d;} | |
9852 | {h;s/.*//;x;} | |
9853 | :M | |
9854 | s/\\(\\n\\) /\\1 /g | |
9855 | /^ /d | |
9856 | /^[ ]*[\\#]/d | |
9857 | /^VPATH *=/d | |
9858 | s/^srcdir *=.*/srcdir = ./ | |
9859 | s/^top_srcdir *=.*/top_srcdir = ./ | |
9860 | /[:=]/!d | |
9861 | /^\\./d | |
9862 | / = /b | |
9863 | / .= /b | |
9864 | /:/!b | |
9865 | s/:.*/:/ | |
9866 | s/ / /g | |
9867 | s/ \\([a-z][a-z-]*[a-zA-Z0-9]\\)\\([ :]\\)/ \\1 \\1-all\\2/g | |
9868 | s/^\\([a-z][a-z-]*[a-zA-Z0-9]\\)\\([ :]\\)/\\1 \\1-all\\2/ | |
9869 | s/ / /g | |
9870 | /^all all-all[ :]/i\\ | |
9871 | all-configured : all-all | |
9872 | s/ [a-zA-Z0-9-]*-all [a-zA-Z0-9-]*-all-all//g | |
9873 | /-all-all/d | |
9874 | a\\ | |
9875 | @ HOST="\$(HOST)\" \\\\\\ | |
9876 | ; test ".\$\$HOST" = "." && HOST=$x sh $ax_enable_builddir_auxdir/config.guess $x \\\\\\ | |
9877 | ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\ | |
9878 | ; use=$x basename "\$\@" -all $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
9879 | ; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" -eq "0" ; then : \\\\\\ | |
9880 | ; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\ | |
9881 | ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\ | |
9882 | ; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\ | |
9883 | ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
9884 | ; (cd "\$\$i" && test ! -f configure && \$(MAKE) \$\$use) || exit; done | |
9885 | /dist-all *:/a\\ | |
9886 | @ HOST="\$(HOST)\" \\\\\\ | |
9887 | ; test ".\$\$HOST" = "." && HOST=$x sh $ax_enable_builddir_auxdir/config.guess $x \\\\\\ | |
9888 | ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\ | |
9889 | ; found=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
9890 | ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\ | |
9891 | ; if test "\$\$found" -eq "0" ; then : \\\\\\ | |
9892 | ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\ | |
9893 | ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
9894 | ; for f in \$\$i/\$(PACKAGE)-\$(VERSION).tar.* \\\\\\ | |
9895 | ; do test -f "\$\$f" && mv "\$\$f" \$(PUB). ; done ; break ; done | |
9896 | /dist-[a-zA-Z0-9]*-all *:/a\\ | |
9897 | @ HOST="\$(HOST)\" \\\\\\ | |
9898 | ; test ".\$\$HOST" = "." && HOST=$x sh ./config.guess $x \\\\\\ | |
9899 | ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\ | |
9900 | ; found=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
9901 | ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).*" \\\\\\ | |
9902 | ; if test "\$\$found" -eq "0" ; then : \\\\\\ | |
9903 | ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\ | |
9904 | ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
9905 | ; for f in \$\$i/\$(PACKAGE)-\$(VERSION).* \\\\\\ | |
9906 | ; do test -f "\$\$f" && mv "\$\$f" \$(PUB). ; done ; break ; done | |
9907 | /distclean-all *:/a\\ | |
9908 | @ HOST="\$(HOST)\" \\\\\\ | |
9909 | ; test ".\$\$HOST" = "." && HOST=$x sh $ax_enable_builddir_auxdir/config.guess $x \\\\\\ | |
9910 | ; BUILD=$x grep "^#### .*|" Makefile | sed -e 's/.*|//' $x \\\\\\ | |
9911 | ; use=$x basename "\$\@" -all $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
9912 | ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\ | |
9913 | ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\ | |
9914 | ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
9915 | ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\ | |
9916 | ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
9917 | ; echo "\$\$i" | grep "^/" > /dev/null && continue \\\\\\ | |
9918 | ; echo "\$\$i" | grep "^../" > /dev/null && continue \\\\\\ | |
9919 | ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile | |
9920 | _EOF | |
9921 | cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefile.sed~" ## DEBUGGING | |
9922 | $ax_enable_builddir_sed -f $tmp/conftemp.sed Makefile >$ac_top_srcdir/Makefile | |
9923 | if test -f "$ac_top_srcdir/Makefile.mk" ; then | |
9924 | { $as_echo "$as_me:${as_lineno-$LINENO}: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&5 | |
9925 | $as_echo "$as_me: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&6;} | |
9926 | cat $ac_top_srcdir/Makefile.mk >>$ac_top_srcdir/Makefile | |
9927 | fi ; xxxx="####" | |
9928 | echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$ac_top_srcdir/Makefile | |
9929 | # sanity check | |
9930 | if grep '^; echo "MAKE ' $ac_top_srcdir/Makefile >/dev/null ; then | |
9931 | { $as_echo "$as_me:${as_lineno-$LINENO}: buggy sed found - it deletes tab in \"a\" text parts" >&5 | |
9932 | $as_echo "$as_me: buggy sed found - it deletes tab in \"a\" text parts" >&6;} | |
9933 | $ax_enable_builddir_sed -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $ac_top_srcdir/Makefile \ | |
9934 | >$ac_top_srcdir/Makefile~ | |
9935 | (test -s $ac_top_srcdir/Makefile~ && mv $ac_top_srcdir/Makefile~ $ac_top_srcdir/Makefile) 2>/dev/null | |
9936 | fi | |
9937 | else | |
9938 | xxxx="\\#\\#\\#\\#" | |
9939 | # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed | |
9940 | echo "s!^$xxxx [^|]* | *$ax_enable_builddir *\$!$xxxx ...... $ax_enable_builddir!" >$tmp/conftemp.sed | |
9941 | $ax_enable_builddir_sed -f "$tmp/conftemp.sed" "$ac_top_srcdir/Makefile" >$tmp/mkfile.tmp | |
9942 | cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefiles.sed~" ## DEBUGGING | |
9943 | cp "$tmp/mkfile.tmp" "$ac_top_srcdir/makefiles.out~" ## DEBUGGING | |
9944 | if cmp -s "$ac_top_srcdir/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then | |
9945 | { $as_echo "$as_me:${as_lineno-$LINENO}: keeping top_srcdir/Makefile from earlier configure" >&5 | |
9946 | $as_echo "$as_me: keeping top_srcdir/Makefile from earlier configure" >&6;} | |
9947 | rm "$tmp/mkfile.tmp" | |
9948 | else | |
9949 | { $as_echo "$as_me:${as_lineno-$LINENO}: reusing top_srcdir/Makefile from earlier configure" >&5 | |
9950 | $as_echo "$as_me: reusing top_srcdir/Makefile from earlier configure" >&6;} | |
9951 | mv "$tmp/mkfile.tmp" "$ac_top_srcdir/Makefile" | |
9952 | fi | |
9953 | fi | |
9954 | { $as_echo "$as_me:${as_lineno-$LINENO}: build in $ax_enable_builddir (HOST=$ax_enable_builddir_host)" >&5 | |
9955 | $as_echo "$as_me: build in $ax_enable_builddir (HOST=$ax_enable_builddir_host)" >&6;} | |
9956 | xxxx="####" | |
9957 | echo "$xxxx" "$ax_enable_builddir_host" "|$ax_enable_builddir" >>$ac_top_srcdir/Makefile | |
9958 | fi | |
9959 | ;; | |
9960 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
9961 | # Older Autoconf quotes --file arguments for eval, but not when files | |
9962 | # are listed without --file. Let's play safe and only enable the eval | |
9963 | # if we detect the quoting. | |
9964 | # TODO: see whether this extra hack can be removed once we start | |
9965 | # requiring Autoconf 2.70 or later. | |
9966 | case $CONFIG_FILES in #( | |
9967 | *\'*) : | |
9968 | eval set x "$CONFIG_FILES" ;; #( | |
9969 | *) : | |
9970 | set x $CONFIG_FILES ;; #( | |
9971 | *) : | |
9972 | ;; | |
9973 | esac | |
9974 | shift | |
9975 | # Used to flag and report bootstrapping failures. | |
9976 | am_rc=0 | |
9977 | for am_mf | |
9978 | do | |
9979 | # Strip MF so we end up with the name of the file. | |
9980 | am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` | |
9981 | # Check whether this is an Automake generated Makefile which includes | |
9982 | # dependency-tracking related rules and includes. | |
9983 | # Grep'ing the whole file directly is not great: AIX grep has a line | |
9984 | # limit of 2048, but all sed's we know have understand at least 4000. | |
9985 | sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ | |
9986 | || continue | |
9987 | am_dirpart=`$as_dirname -- "$am_mf" || | |
9988 | $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
9989 | X"$am_mf" : 'X\(//\)[^/]' \| \ | |
9990 | X"$am_mf" : 'X\(//\)$' \| \ | |
9991 | X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || | |
9992 | $as_echo X"$am_mf" | | |
9993 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
9994 | s//\1/ | |
9995 | q | |
9996 | } | |
9997 | /^X\(\/\/\)[^/].*/{ | |
9998 | s//\1/ | |
9999 | q | |
10000 | } | |
10001 | /^X\(\/\/\)$/{ | |
10002 | s//\1/ | |
10003 | q | |
10004 | } | |
10005 | /^X\(\/\).*/{ | |
10006 | s//\1/ | |
10007 | q | |
10008 | } | |
10009 | s/.*/./; q'` | |
10010 | am_filepart=`$as_basename -- "$am_mf" || | |
10011 | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ | |
10012 | X"$am_mf" : 'X\(//\)$' \| \ | |
10013 | X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || | |
10014 | $as_echo X/"$am_mf" | | |
10015 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
10016 | s//\1/ | |
10017 | q | |
10018 | } | |
10019 | /^X\/\(\/\/\)$/{ | |
10020 | s//\1/ | |
10021 | q | |
10022 | } | |
10023 | /^X\/\(\/\).*/{ | |
10024 | s//\1/ | |
10025 | q | |
10026 | } | |
10027 | s/.*/./; q'` | |
10028 | { echo "$as_me:$LINENO: cd "$am_dirpart" \ | |
10029 | && sed -e '/# am--include-marker/d' "$am_filepart" \ | |
10030 | | $MAKE -f - am--depfiles" >&5 | |
10031 | (cd "$am_dirpart" \ | |
10032 | && sed -e '/# am--include-marker/d' "$am_filepart" \ | |
10033 | | $MAKE -f - am--depfiles) >&5 2>&5 | |
10034 | ac_status=$? | |
10035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10036 | (exit $ac_status); } || am_rc=$? | |
10037 | done | |
10038 | if test $am_rc -ne 0; then | |
10039 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10040 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
10041 | as_fn_error $? "Something went wrong bootstrapping makefile fragments | |
10042 | for automatic dependency tracking. If GNU make was not used, consider | |
10043 | re-running the configure script with MAKE=\"gmake\" (or whatever is | |
10044 | necessary). You can also try re-running configure with the | |
10045 | '--disable-dependency-tracking' option to at least be able to build | |
10046 | the package (albeit without support for automatic dependency tracking). | |
10047 | See \`config.log' for more details" "$LINENO" 5; } | |
10048 | fi | |
10049 | { am_dirpart=; unset am_dirpart;} | |
10050 | { am_filepart=; unset am_filepart;} | |
10051 | { am_mf=; unset am_mf;} | |
10052 | { am_rc=; unset am_rc;} | |
10053 | rm -f conftest-deps.mk | |
10054 | } | |
10055 | ;; | |
10056 | ||
10057 | esac | |
10058 | done # for ac_tag | |
10059 | ||
10060 | ||
10061 | as_fn_exit 0 | |
10062 | _ACEOF | |
10063 | ac_clean_files=$ac_clean_files_save | |
10064 | ||
10065 | test $ac_write_fail = 0 || | |
10066 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
10067 | ||
10068 | ||
10069 | # configure is writing to config.log, and then calls config.status. | |
10070 | # config.status does its own redirection, appending to config.log. | |
10071 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
10072 | # by configure, so config.status won't be able to write to it; its | |
10073 | # output is simply discarded. So we exec the FD to /dev/null, | |
10074 | # effectively closing config.log, so it can be properly (re)opened and | |
10075 | # appended to by config.status. When coming back to configure, we | |
10076 | # need to make the FD available again. | |
10077 | if test "$no_create" != yes; then | |
10078 | ac_cs_success=: | |
10079 | ac_config_status_args= | |
10080 | test "$silent" = yes && | |
10081 | ac_config_status_args="$ac_config_status_args --quiet" | |
10082 | exec 5>/dev/null | |
10083 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
10084 | exec 5>>config.log | |
10085 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
10086 | # would make configure fail if this is the last instruction. | |
10087 | $ac_cs_success || as_fn_exit 1 | |
10088 | fi | |
10089 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
10090 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
10091 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
10092 | fi | |
10093 | ||
10094 | ||
10095 | in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null` | |
10096 | if [ "$in_git_worktree" = "true" ]; then | |
10097 | git_dir=`git rev-parse --git-dir 2>/dev/null` | |
10098 | srcdir=`dirname "$git_dir"` | |
10099 | exclude_dir=`pwd | sed "s,^$srcdir,,g"` | |
10100 | if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then | |
10101 | echo "$exclude_dir" >> "$git_dir/info/exclude" | |
10102 | fi | |
10103 | fi | |
10104 | ||
10105 | echo \ | |
10106 | "-------------------------------------------------------------------------------- | |
10107 | build configured: | |
10108 | ||
10109 | i3lock version: `echo ${I3LOCK_VERSION} | sed 's,\\\\,,g'` | |
10110 | is release version: ${is_release} | |
10111 | ||
10112 | enable debug flags: ${ax_enable_debug} | |
10113 | code coverage: ${CODE_COVERAGE_ENABLED} | |
10114 | enabled sanitizers: ${ax_enabled_sanitizers} | |
10115 | ||
10116 | To compile, run: | |
10117 | ||
10118 | cd `pwd` && make -j8 | |
10119 | --------------------------------------------------------------------------------" |
0 | # -*- Autoconf -*- | |
1 | # Run autoreconf -fi to generate a configure script from this file. | |
2 | ||
3 | AC_PREREQ([2.69]) | |
4 | AC_INIT([i3lock], [2.13], [https://github.com/i3/i3lock/issues]) | |
5 | # For AX_EXTEND_SRCDIR | |
6 | AX_ENABLE_BUILDDIR | |
7 | AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2]) | |
8 | # Default to silent rules, use V=1 to get verbose compilation output. | |
9 | AM_SILENT_RULES([yes]) | |
10 | # Make it possible to disable maintainer mode to disable re-generation of build | |
11 | # system files. | |
12 | AM_MAINTAINER_MODE([enable]) | |
13 | AC_CONFIG_SRCDIR([i3lock.c]) | |
14 | AC_CONFIG_HEADERS([config.h]) | |
15 | AC_CONFIG_MACRO_DIR([m4]) | |
16 | ||
17 | dnl Verify macros defined in m4/ such as AX_SANITIZERS are not present in the | |
18 | dnl output, i.e. are replaced as expected. This line results in a better error | |
19 | dnl message when using aclocal < 1.13 (which does not understand | |
20 | dnl AC_CONFIG_MACRO_DIR) without passing the -I m4 parameter. | |
21 | m4_pattern_forbid([AX_SANITIZERS]) | |
22 | ||
23 | # Verify we are using GNU make because we use '%'-style pattern rules in | |
24 | # Makefile.am, which are a GNU make extension. Pull requests to replace | |
25 | # '%'-style pattern rules with a more portable alternative are welcome. | |
26 | AX_CHECK_GNU_MAKE | |
27 | AS_VAR_IF([_cv_gnu_make_command], [""], [AC_MSG_ERROR([the i3lock Makefile.am requires GNU make])]) | |
28 | ||
29 | AX_EXTEND_SRCDIR | |
30 | ||
31 | AS_IF([test -d ${srcdir}/.git], | |
32 | [ | |
33 | VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)" | |
34 | I3LOCK_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} log --pretty=format:%cd --date=short -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")" | |
35 | # Mirrors what libi3/is_debug_build.c does: | |
36 | is_release=$(test $(echo "${I3LOCK_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no) | |
37 | ], | |
38 | [ | |
39 | VERSION="$(cut -d '-' -f 1 ${srcdir}/I3LOCK_VERSION | cut -d ' ' -f 1)" | |
40 | I3LOCK_VERSION="$(sed -e 's/@<:@\"?\\@:>@/\\&/g' ${srcdir}/I3LOCK_VERSION)" | |
41 | is_release="$(grep -q non-git ${srcdir}/I3LOCK_VERSION && echo no || echo yes)" | |
42 | ]) | |
43 | AC_SUBST([I3LOCK_VERSION], [$I3LOCK_VERSION]) | |
44 | AC_DEFINE_UNQUOTED([I3LOCK_VERSION], ["${I3LOCK_VERSION}"], [i3lock version]) | |
45 | ||
46 | AX_CODE_COVERAGE | |
47 | ||
48 | dnl is_release must be lowercase because AX_CHECK_ENABLE_DEBUG calls m4_tolower | |
49 | dnl on its fourth argument. | |
50 | AX_CHECK_ENABLE_DEBUG([yes], , [UNUSED_NDEBUG], [$is_release]) | |
51 | ||
52 | AC_PROG_CC_C99 | |
53 | ||
54 | # For strnlen() and vasprintf(). | |
55 | AC_USE_SYSTEM_EXTENSIONS | |
56 | ||
57 | # Checks for typedefs, structures, and compiler characteristics. | |
58 | AC_CHECK_HEADER_STDBOOL | |
59 | dnl The error message should include the specific type which could not be | |
60 | dnl found, but I do not see a way to achieve that. | |
61 | AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t], , [AC_MSG_FAILURE([cannot find required type])]) | |
62 | ||
63 | # Checks for library functions. | |
64 | AC_FUNC_FORK | |
65 | AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | |
66 | AC_FUNC_STRNLEN | |
67 | AC_CHECK_FUNCS([atexit dup2 ftruncate getcwd gettimeofday localtime_r memchr memset mkdir rmdir setlocale socket strcasecmp strchr strdup strerror strncasecmp strndup strrchr strspn strstr strtol strtoul], , [AC_MSG_FAILURE([cannot find the $ac_func function, which i3lock requires])]) | |
68 | AC_CHECK_FUNCS([explicit_bzero]) | |
69 | ||
70 | # Checks for libraries. | |
71 | ||
72 | AC_SEARCH_LIBS([floor], [m], , [AC_MSG_FAILURE([cannot find the required floor() function despite trying to link with -lm])]) | |
73 | ||
74 | # libev does not ship with a pkg-config file :(. | |
75 | AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_run() function despite trying to link with -lev])]) | |
76 | ||
77 | AC_SEARCH_LIBS([shm_open], [rt]) | |
78 | ||
79 | # Only disable PAM on OpenBSD where i3lock uses BSD Auth instead | |
80 | case "$host" in | |
81 | *-openbsd*) | |
82 | # Nothing yet. | |
83 | ;; | |
84 | *) | |
85 | AC_SEARCH_LIBS([pam_authenticate], [pam]) | |
86 | ;; | |
87 | esac | |
88 | ||
89 | AC_SEARCH_LIBS([iconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])]) | |
90 | ||
91 | dnl Each prefix corresponds to a source tarball which users might have | |
92 | dnl downloaded in a newer version and would like to overwrite. | |
93 | PKG_CHECK_MODULES([XCB], [xcb xcb-xkb xcb-xinerama xcb-randr]) | |
94 | PKG_CHECK_MODULES([XCB_IMAGE], [xcb-image]) | |
95 | PKG_CHECK_MODULES([XCB_UTIL], [xcb-event xcb-util xcb-atom]) | |
96 | PKG_CHECK_MODULES([XCB_UTIL_XRM], [xcb-xrm]) | |
97 | PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon xkbcommon-x11]) | |
98 | PKG_CHECK_MODULES([CAIRO], [cairo]) | |
99 | ||
100 | # Checks for programs. | |
101 | AC_PROG_AWK | |
102 | AC_PROG_CPP | |
103 | AC_PROG_INSTALL | |
104 | AC_PROG_MAKE_SET | |
105 | AC_PROG_RANLIB | |
106 | AC_PROG_LN_S | |
107 | ||
108 | AM_PROG_AR | |
109 | ||
110 | AX_FLAGS_WARN_ALL | |
111 | AX_CHECK_COMPILE_FLAG([-Wunused-value], [AX_APPEND_FLAG([-Wunused-value], [AM_CFLAGS])]) | |
112 | AC_SUBST(AM_CFLAGS) | |
113 | ||
114 | # Checks for header files. | |
115 | AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h locale.h netinet/in.h paths.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h], , [AC_MSG_FAILURE([cannot find the $ac_header header, which i3lock requires])]) | |
116 | ||
117 | AC_CONFIG_FILES([Makefile]) | |
118 | ||
119 | # Enable address sanitizer for non-release builds. The performance hit is a | |
120 | # 50% increase of wallclock time for the testsuite on my machine. | |
121 | if test x$is_release = xyes; then | |
122 | default_sanitizers= | |
123 | else | |
124 | default_sanitizers=address | |
125 | fi | |
126 | AX_SANITIZERS(, [$default_sanitizers], [AC_DEFINE([I3LOCK_ASAN_ENABLED], [], [Enable ASAN])]) | |
127 | ||
128 | AC_OUTPUT | |
129 | ||
130 | in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null` | |
131 | if [[ "$in_git_worktree" = "true" ]]; then | |
132 | git_dir=`git rev-parse --git-dir 2>/dev/null` | |
133 | srcdir=`dirname "$git_dir"` | |
134 | exclude_dir=`pwd | sed "s,^$srcdir,,g"` | |
135 | if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then | |
136 | echo "$exclude_dir" >> "$git_dir/info/exclude" | |
137 | fi | |
138 | fi | |
139 | ||
140 | echo \ | |
141 | "-------------------------------------------------------------------------------- | |
142 | build configured: | |
143 | ||
144 | AS_HELP_STRING([i3lock version:], [`echo ${I3LOCK_VERSION} | sed 's,\\\\,,g'`]) | |
145 | AS_HELP_STRING([is release version:], [${is_release}]) | |
146 | ||
147 | AS_HELP_STRING([enable debug flags:], [${ax_enable_debug}]) | |
148 | AS_HELP_STRING([code coverage:], [${CODE_COVERAGE_ENABLED}]) | |
149 | AS_HELP_STRING([enabled sanitizers:], [${ax_enabled_sanitizers}]) | |
150 | ||
151 | To compile, run: | |
152 | ||
153 | cd `pwd` && make -j8 | |
154 | --------------------------------------------------------------------------------" |
0 | #ifndef _CURSORS_H | |
1 | #define _CURSORS_H | |
2 | ||
3 | #define CURS_NONE 0 | |
4 | #define CURS_WIN 1 | |
5 | #define CURS_DEFAULT 2 | |
6 | ||
7 | #endif |
0 | #! /bin/sh | |
1 | # depcomp - compile a program generating dependencies as side-effects | |
2 | ||
3 | scriptversion=2018-03-07.03; # UTC | |
4 | ||
5 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
6 | ||
7 | # This program is free software; you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License as published by | |
9 | # the Free Software Foundation; either version 2, or (at your option) | |
10 | # any later version. | |
11 | ||
12 | # This program is distributed in the hope that it will be useful, | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
16 | ||
17 | # You should have received a copy of the GNU General Public License | |
18 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | |
19 | ||
20 | # As a special exception to the GNU General Public License, if you | |
21 | # distribute this file as part of a program that contains a | |
22 | # configuration script generated by Autoconf, you may include it under | |
23 | # the same distribution terms that you use for the rest of that program. | |
24 | ||
25 | # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. | |
26 | ||
27 | case $1 in | |
28 | '') | |
29 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
30 | exit 1; | |
31 | ;; | |
32 | -h | --h*) | |
33 | cat <<\EOF | |
34 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] | |
35 | ||
36 | Run PROGRAMS ARGS to compile a file, generating dependencies | |
37 | as side-effects. | |
38 | ||
39 | Environment variables: | |
40 | depmode Dependency tracking mode. | |
41 | source Source file read by 'PROGRAMS ARGS'. | |
42 | object Object file output by 'PROGRAMS ARGS'. | |
43 | DEPDIR directory where to store dependencies. | |
44 | depfile Dependency file to output. | |
45 | tmpdepfile Temporary file to use when outputting dependencies. | |
46 | libtool Whether libtool is used (yes/no). | |
47 | ||
48 | Report bugs to <bug-automake@gnu.org>. | |
49 | EOF | |
50 | exit $? | |
51 | ;; | |
52 | -v | --v*) | |
53 | echo "depcomp $scriptversion" | |
54 | exit $? | |
55 | ;; | |
56 | esac | |
57 | ||
58 | # Get the directory component of the given path, and save it in the | |
59 | # global variables '$dir'. Note that this directory component will | |
60 | # be either empty or ending with a '/' character. This is deliberate. | |
61 | set_dir_from () | |
62 | { | |
63 | case $1 in | |
64 | */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; | |
65 | *) dir=;; | |
66 | esac | |
67 | } | |
68 | ||
69 | # Get the suffix-stripped basename of the given path, and save it the | |
70 | # global variable '$base'. | |
71 | set_base_from () | |
72 | { | |
73 | base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` | |
74 | } | |
75 | ||
76 | # If no dependency file was actually created by the compiler invocation, | |
77 | # we still have to create a dummy depfile, to avoid errors with the | |
78 | # Makefile "include basename.Plo" scheme. | |
79 | make_dummy_depfile () | |
80 | { | |
81 | echo "#dummy" > "$depfile" | |
82 | } | |
83 | ||
84 | # Factor out some common post-processing of the generated depfile. | |
85 | # Requires the auxiliary global variable '$tmpdepfile' to be set. | |
86 | aix_post_process_depfile () | |
87 | { | |
88 | # If the compiler actually managed to produce a dependency file, | |
89 | # post-process it. | |
90 | if test -f "$tmpdepfile"; then | |
91 | # Each line is of the form 'foo.o: dependency.h'. | |
92 | # Do two passes, one to just change these to | |
93 | # $object: dependency.h | |
94 | # and one to simply output | |
95 | # dependency.h: | |
96 | # which is needed to avoid the deleted-header problem. | |
97 | { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" | |
98 | sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" | |
99 | } > "$depfile" | |
100 | rm -f "$tmpdepfile" | |
101 | else | |
102 | make_dummy_depfile | |
103 | fi | |
104 | } | |
105 | ||
106 | # A tabulation character. | |
107 | tab=' ' | |
108 | # A newline character. | |
109 | nl=' | |
110 | ' | |
111 | # Character ranges might be problematic outside the C locale. | |
112 | # These definitions help. | |
113 | upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
114 | lower=abcdefghijklmnopqrstuvwxyz | |
115 | digits=0123456789 | |
116 | alpha=${upper}${lower} | |
117 | ||
118 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then | |
119 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 | |
120 | exit 1 | |
121 | fi | |
122 | ||
123 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. | |
124 | depfile=${depfile-`echo "$object" | | |
125 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} | |
126 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} | |
127 | ||
128 | rm -f "$tmpdepfile" | |
129 | ||
130 | # Avoid interferences from the environment. | |
131 | gccflag= dashmflag= | |
132 | ||
133 | # Some modes work just like other modes, but use different flags. We | |
134 | # parameterize here, but still list the modes in the big case below, | |
135 | # to make depend.m4 easier to write. Note that we *cannot* use a case | |
136 | # here, because this file can only contain one case statement. | |
137 | if test "$depmode" = hp; then | |
138 | # HP compiler uses -M and no extra arg. | |
139 | gccflag=-M | |
140 | depmode=gcc | |
141 | fi | |
142 | ||
143 | if test "$depmode" = dashXmstdout; then | |
144 | # This is just like dashmstdout with a different argument. | |
145 | dashmflag=-xM | |
146 | depmode=dashmstdout | |
147 | fi | |
148 | ||
149 | cygpath_u="cygpath -u -f -" | |
150 | if test "$depmode" = msvcmsys; then | |
151 | # This is just like msvisualcpp but w/o cygpath translation. | |
152 | # Just convert the backslash-escaped backslashes to single forward | |
153 | # slashes to satisfy depend.m4 | |
154 | cygpath_u='sed s,\\\\,/,g' | |
155 | depmode=msvisualcpp | |
156 | fi | |
157 | ||
158 | if test "$depmode" = msvc7msys; then | |
159 | # This is just like msvc7 but w/o cygpath translation. | |
160 | # Just convert the backslash-escaped backslashes to single forward | |
161 | # slashes to satisfy depend.m4 | |
162 | cygpath_u='sed s,\\\\,/,g' | |
163 | depmode=msvc7 | |
164 | fi | |
165 | ||
166 | if test "$depmode" = xlc; then | |
167 | # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. | |
168 | gccflag=-qmakedep=gcc,-MF | |
169 | depmode=gcc | |
170 | fi | |
171 | ||
172 | case "$depmode" in | |
173 | gcc3) | |
174 | ## gcc 3 implements dependency tracking that does exactly what | |
175 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like | |
176 | ## it if -MD -MP comes after the -MF stuff. Hmm. | |
177 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon | |
178 | ## the command line argument order; so add the flags where they | |
179 | ## appear in depend2.am. Note that the slowdown incurred here | |
180 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. | |
181 | for arg | |
182 | do | |
183 | case $arg in | |
184 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; | |
185 | *) set fnord "$@" "$arg" ;; | |
186 | esac | |
187 | shift # fnord | |
188 | shift # $arg | |
189 | done | |
190 | "$@" | |
191 | stat=$? | |
192 | if test $stat -ne 0; then | |
193 | rm -f "$tmpdepfile" | |
194 | exit $stat | |
195 | fi | |
196 | mv "$tmpdepfile" "$depfile" | |
197 | ;; | |
198 | ||
199 | gcc) | |
200 | ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. | |
201 | ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. | |
202 | ## (see the conditional assignment to $gccflag above). | |
203 | ## There are various ways to get dependency output from gcc. Here's | |
204 | ## why we pick this rather obscure method: | |
205 | ## - Don't want to use -MD because we'd like the dependencies to end | |
206 | ## up in a subdir. Having to rename by hand is ugly. | |
207 | ## (We might end up doing this anyway to support other compilers.) | |
208 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like | |
209 | ## -MM, not -M (despite what the docs say). Also, it might not be | |
210 | ## supported by the other compilers which use the 'gcc' depmode. | |
211 | ## - Using -M directly means running the compiler twice (even worse | |
212 | ## than renaming). | |
213 | if test -z "$gccflag"; then | |
214 | gccflag=-MD, | |
215 | fi | |
216 | "$@" -Wp,"$gccflag$tmpdepfile" | |
217 | stat=$? | |
218 | if test $stat -ne 0; then | |
219 | rm -f "$tmpdepfile" | |
220 | exit $stat | |
221 | fi | |
222 | rm -f "$depfile" | |
223 | echo "$object : \\" > "$depfile" | |
224 | # The second -e expression handles DOS-style file names with drive | |
225 | # letters. | |
226 | sed -e 's/^[^:]*: / /' \ | |
227 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" | |
228 | ## This next piece of magic avoids the "deleted header file" problem. | |
229 | ## The problem is that when a header file which appears in a .P file | |
230 | ## is deleted, the dependency causes make to die (because there is | |
231 | ## typically no way to rebuild the header). We avoid this by adding | |
232 | ## dummy dependencies for each header file. Too bad gcc doesn't do | |
233 | ## this for us directly. | |
234 | ## Some versions of gcc put a space before the ':'. On the theory | |
235 | ## that the space means something, we add a space to the output as | |
236 | ## well. hp depmode also adds that space, but also prefixes the VPATH | |
237 | ## to the object. Take care to not repeat it in the output. | |
238 | ## Some versions of the HPUX 10.20 sed can't process this invocation | |
239 | ## correctly. Breaking it into two sed invocations is a workaround. | |
240 | tr ' ' "$nl" < "$tmpdepfile" \ | |
241 | | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | |
242 | | sed -e 's/$/ :/' >> "$depfile" | |
243 | rm -f "$tmpdepfile" | |
244 | ;; | |
245 | ||
246 | hp) | |
247 | # This case exists only to let depend.m4 do its work. It works by | |
248 | # looking at the text of this script. This case will never be run, | |
249 | # since it is checked for above. | |
250 | exit 1 | |
251 | ;; | |
252 | ||
253 | sgi) | |
254 | if test "$libtool" = yes; then | |
255 | "$@" "-Wp,-MDupdate,$tmpdepfile" | |
256 | else | |
257 | "$@" -MDupdate "$tmpdepfile" | |
258 | fi | |
259 | stat=$? | |
260 | if test $stat -ne 0; then | |
261 | rm -f "$tmpdepfile" | |
262 | exit $stat | |
263 | fi | |
264 | rm -f "$depfile" | |
265 | ||
266 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files | |
267 | echo "$object : \\" > "$depfile" | |
268 | # Clip off the initial element (the dependent). Don't try to be | |
269 | # clever and replace this with sed code, as IRIX sed won't handle | |
270 | # lines with more than a fixed number of characters (4096 in | |
271 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; | |
272 | # the IRIX cc adds comments like '#:fec' to the end of the | |
273 | # dependency line. | |
274 | tr ' ' "$nl" < "$tmpdepfile" \ | |
275 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | |
276 | | tr "$nl" ' ' >> "$depfile" | |
277 | echo >> "$depfile" | |
278 | # The second pass generates a dummy entry for each header file. | |
279 | tr ' ' "$nl" < "$tmpdepfile" \ | |
280 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ | |
281 | >> "$depfile" | |
282 | else | |
283 | make_dummy_depfile | |
284 | fi | |
285 | rm -f "$tmpdepfile" | |
286 | ;; | |
287 | ||
288 | xlc) | |
289 | # This case exists only to let depend.m4 do its work. It works by | |
290 | # looking at the text of this script. This case will never be run, | |
291 | # since it is checked for above. | |
292 | exit 1 | |
293 | ;; | |
294 | ||
295 | aix) | |
296 | # The C for AIX Compiler uses -M and outputs the dependencies | |
297 | # in a .u file. In older versions, this file always lives in the | |
298 | # current directory. Also, the AIX compiler puts '$object:' at the | |
299 | # start of each line; $object doesn't have directory information. | |
300 | # Version 6 uses the directory in both cases. | |
301 | set_dir_from "$object" | |
302 | set_base_from "$object" | |
303 | if test "$libtool" = yes; then | |
304 | tmpdepfile1=$dir$base.u | |
305 | tmpdepfile2=$base.u | |
306 | tmpdepfile3=$dir.libs/$base.u | |
307 | "$@" -Wc,-M | |
308 | else | |
309 | tmpdepfile1=$dir$base.u | |
310 | tmpdepfile2=$dir$base.u | |
311 | tmpdepfile3=$dir$base.u | |
312 | "$@" -M | |
313 | fi | |
314 | stat=$? | |
315 | if test $stat -ne 0; then | |
316 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
317 | exit $stat | |
318 | fi | |
319 | ||
320 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
321 | do | |
322 | test -f "$tmpdepfile" && break | |
323 | done | |
324 | aix_post_process_depfile | |
325 | ;; | |
326 | ||
327 | tcc) | |
328 | # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 | |
329 | # FIXME: That version still under development at the moment of writing. | |
330 | # Make that this statement remains true also for stable, released | |
331 | # versions. | |
332 | # It will wrap lines (doesn't matter whether long or short) with a | |
333 | # trailing '\', as in: | |
334 | # | |
335 | # foo.o : \ | |
336 | # foo.c \ | |
337 | # foo.h \ | |
338 | # | |
339 | # It will put a trailing '\' even on the last line, and will use leading | |
340 | # spaces rather than leading tabs (at least since its commit 0394caf7 | |
341 | # "Emit spaces for -MD"). | |
342 | "$@" -MD -MF "$tmpdepfile" | |
343 | stat=$? | |
344 | if test $stat -ne 0; then | |
345 | rm -f "$tmpdepfile" | |
346 | exit $stat | |
347 | fi | |
348 | rm -f "$depfile" | |
349 | # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. | |
350 | # We have to change lines of the first kind to '$object: \'. | |
351 | sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" | |
352 | # And for each line of the second kind, we have to emit a 'dep.h:' | |
353 | # dummy dependency, to avoid the deleted-header problem. | |
354 | sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" | |
355 | rm -f "$tmpdepfile" | |
356 | ;; | |
357 | ||
358 | ## The order of this option in the case statement is important, since the | |
359 | ## shell code in configure will try each of these formats in the order | |
360 | ## listed in this file. A plain '-MD' option would be understood by many | |
361 | ## compilers, so we must ensure this comes after the gcc and icc options. | |
362 | pgcc) | |
363 | # Portland's C compiler understands '-MD'. | |
364 | # Will always output deps to 'file.d' where file is the root name of the | |
365 | # source file under compilation, even if file resides in a subdirectory. | |
366 | # The object file name does not affect the name of the '.d' file. | |
367 | # pgcc 10.2 will output | |
368 | # foo.o: sub/foo.c sub/foo.h | |
369 | # and will wrap long lines using '\' : | |
370 | # foo.o: sub/foo.c ... \ | |
371 | # sub/foo.h ... \ | |
372 | # ... | |
373 | set_dir_from "$object" | |
374 | # Use the source, not the object, to determine the base name, since | |
375 | # that's sadly what pgcc will do too. | |
376 | set_base_from "$source" | |
377 | tmpdepfile=$base.d | |
378 | ||
379 | # For projects that build the same source file twice into different object | |
380 | # files, the pgcc approach of using the *source* file root name can cause | |
381 | # problems in parallel builds. Use a locking strategy to avoid stomping on | |
382 | # the same $tmpdepfile. | |
383 | lockdir=$base.d-lock | |
384 | trap " | |
385 | echo '$0: caught signal, cleaning up...' >&2 | |
386 | rmdir '$lockdir' | |
387 | exit 1 | |
388 | " 1 2 13 15 | |
389 | numtries=100 | |
390 | i=$numtries | |
391 | while test $i -gt 0; do | |
392 | # mkdir is a portable test-and-set. | |
393 | if mkdir "$lockdir" 2>/dev/null; then | |
394 | # This process acquired the lock. | |
395 | "$@" -MD | |
396 | stat=$? | |
397 | # Release the lock. | |
398 | rmdir "$lockdir" | |
399 | break | |
400 | else | |
401 | # If the lock is being held by a different process, wait | |
402 | # until the winning process is done or we timeout. | |
403 | while test -d "$lockdir" && test $i -gt 0; do | |
404 | sleep 1 | |
405 | i=`expr $i - 1` | |
406 | done | |
407 | fi | |
408 | i=`expr $i - 1` | |
409 | done | |
410 | trap - 1 2 13 15 | |
411 | if test $i -le 0; then | |
412 | echo "$0: failed to acquire lock after $numtries attempts" >&2 | |
413 | echo "$0: check lockdir '$lockdir'" >&2 | |
414 | exit 1 | |
415 | fi | |
416 | ||
417 | if test $stat -ne 0; then | |
418 | rm -f "$tmpdepfile" | |
419 | exit $stat | |
420 | fi | |
421 | rm -f "$depfile" | |
422 | # Each line is of the form `foo.o: dependent.h', | |
423 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. | |
424 | # Do two passes, one to just change these to | |
425 | # `$object: dependent.h' and one to simply `dependent.h:'. | |
426 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" | |
427 | # Some versions of the HPUX 10.20 sed can't process this invocation | |
428 | # correctly. Breaking it into two sed invocations is a workaround. | |
429 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | |
430 | | sed -e 's/$/ :/' >> "$depfile" | |
431 | rm -f "$tmpdepfile" | |
432 | ;; | |
433 | ||
434 | hp2) | |
435 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 | |
436 | # compilers, which have integrated preprocessors. The correct option | |
437 | # to use with these is +Maked; it writes dependencies to a file named | |
438 | # 'foo.d', which lands next to the object file, wherever that | |
439 | # happens to be. | |
440 | # Much of this is similar to the tru64 case; see comments there. | |
441 | set_dir_from "$object" | |
442 | set_base_from "$object" | |
443 | if test "$libtool" = yes; then | |
444 | tmpdepfile1=$dir$base.d | |
445 | tmpdepfile2=$dir.libs/$base.d | |
446 | "$@" -Wc,+Maked | |
447 | else | |
448 | tmpdepfile1=$dir$base.d | |
449 | tmpdepfile2=$dir$base.d | |
450 | "$@" +Maked | |
451 | fi | |
452 | stat=$? | |
453 | if test $stat -ne 0; then | |
454 | rm -f "$tmpdepfile1" "$tmpdepfile2" | |
455 | exit $stat | |
456 | fi | |
457 | ||
458 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" | |
459 | do | |
460 | test -f "$tmpdepfile" && break | |
461 | done | |
462 | if test -f "$tmpdepfile"; then | |
463 | sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" | |
464 | # Add 'dependent.h:' lines. | |
465 | sed -ne '2,${ | |
466 | s/^ *// | |
467 | s/ \\*$// | |
468 | s/$/:/ | |
469 | p | |
470 | }' "$tmpdepfile" >> "$depfile" | |
471 | else | |
472 | make_dummy_depfile | |
473 | fi | |
474 | rm -f "$tmpdepfile" "$tmpdepfile2" | |
475 | ;; | |
476 | ||
477 | tru64) | |
478 | # The Tru64 compiler uses -MD to generate dependencies as a side | |
479 | # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. | |
480 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put | |
481 | # dependencies in 'foo.d' instead, so we check for that too. | |
482 | # Subdirectories are respected. | |
483 | set_dir_from "$object" | |
484 | set_base_from "$object" | |
485 | ||
486 | if test "$libtool" = yes; then | |
487 | # Libtool generates 2 separate objects for the 2 libraries. These | |
488 | # two compilations output dependencies in $dir.libs/$base.o.d and | |
489 | # in $dir$base.o.d. We have to check for both files, because | |
490 | # one of the two compilations can be disabled. We should prefer | |
491 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is | |
492 | # automatically cleaned when .libs/ is deleted, while ignoring | |
493 | # the former would cause a distcleancheck panic. | |
494 | tmpdepfile1=$dir$base.o.d # libtool 1.5 | |
495 | tmpdepfile2=$dir.libs/$base.o.d # Likewise. | |
496 | tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 | |
497 | "$@" -Wc,-MD | |
498 | else | |
499 | tmpdepfile1=$dir$base.d | |
500 | tmpdepfile2=$dir$base.d | |
501 | tmpdepfile3=$dir$base.d | |
502 | "$@" -MD | |
503 | fi | |
504 | ||
505 | stat=$? | |
506 | if test $stat -ne 0; then | |
507 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
508 | exit $stat | |
509 | fi | |
510 | ||
511 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
512 | do | |
513 | test -f "$tmpdepfile" && break | |
514 | done | |
515 | # Same post-processing that is required for AIX mode. | |
516 | aix_post_process_depfile | |
517 | ;; | |
518 | ||
519 | msvc7) | |
520 | if test "$libtool" = yes; then | |
521 | showIncludes=-Wc,-showIncludes | |
522 | else | |
523 | showIncludes=-showIncludes | |
524 | fi | |
525 | "$@" $showIncludes > "$tmpdepfile" | |
526 | stat=$? | |
527 | grep -v '^Note: including file: ' "$tmpdepfile" | |
528 | if test $stat -ne 0; then | |
529 | rm -f "$tmpdepfile" | |
530 | exit $stat | |
531 | fi | |
532 | rm -f "$depfile" | |
533 | echo "$object : \\" > "$depfile" | |
534 | # The first sed program below extracts the file names and escapes | |
535 | # backslashes for cygpath. The second sed program outputs the file | |
536 | # name when reading, but also accumulates all include files in the | |
537 | # hold buffer in order to output them again at the end. This only | |
538 | # works with sed implementations that can handle large buffers. | |
539 | sed < "$tmpdepfile" -n ' | |
540 | /^Note: including file: *\(.*\)/ { | |
541 | s//\1/ | |
542 | s/\\/\\\\/g | |
543 | p | |
544 | }' | $cygpath_u | sort -u | sed -n ' | |
545 | s/ /\\ /g | |
546 | s/\(.*\)/'"$tab"'\1 \\/p | |
547 | s/.\(.*\) \\/\1:/ | |
548 | H | |
549 | $ { | |
550 | s/.*/'"$tab"'/ | |
551 | G | |
552 | p | |
553 | }' >> "$depfile" | |
554 | echo >> "$depfile" # make sure the fragment doesn't end with a backslash | |
555 | rm -f "$tmpdepfile" | |
556 | ;; | |
557 | ||
558 | msvc7msys) | |
559 | # This case exists only to let depend.m4 do its work. It works by | |
560 | # looking at the text of this script. This case will never be run, | |
561 | # since it is checked for above. | |
562 | exit 1 | |
563 | ;; | |
564 | ||
565 | #nosideeffect) | |
566 | # This comment above is used by automake to tell side-effect | |
567 | # dependency tracking mechanisms from slower ones. | |
568 | ||
569 | dashmstdout) | |
570 | # Important note: in order to support this mode, a compiler *must* | |
571 | # always write the preprocessed file to stdout, regardless of -o. | |
572 | "$@" || exit $? | |
573 | ||
574 | # Remove the call to Libtool. | |
575 | if test "$libtool" = yes; then | |
576 | while test "X$1" != 'X--mode=compile'; do | |
577 | shift | |
578 | done | |
579 | shift | |
580 | fi | |
581 | ||
582 | # Remove '-o $object'. | |
583 | IFS=" " | |
584 | for arg | |
585 | do | |
586 | case $arg in | |
587 | -o) | |
588 | shift | |
589 | ;; | |
590 | $object) | |
591 | shift | |
592 | ;; | |
593 | *) | |
594 | set fnord "$@" "$arg" | |
595 | shift # fnord | |
596 | shift # $arg | |
597 | ;; | |
598 | esac | |
599 | done | |
600 | ||
601 | test -z "$dashmflag" && dashmflag=-M | |
602 | # Require at least two characters before searching for ':' | |
603 | # in the target name. This is to cope with DOS-style filenames: | |
604 | # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. | |
605 | "$@" $dashmflag | | |
606 | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" | |
607 | rm -f "$depfile" | |
608 | cat < "$tmpdepfile" > "$depfile" | |
609 | # Some versions of the HPUX 10.20 sed can't process this sed invocation | |
610 | # correctly. Breaking it into two sed invocations is a workaround. | |
611 | tr ' ' "$nl" < "$tmpdepfile" \ | |
612 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | |
613 | | sed -e 's/$/ :/' >> "$depfile" | |
614 | rm -f "$tmpdepfile" | |
615 | ;; | |
616 | ||
617 | dashXmstdout) | |
618 | # This case only exists to satisfy depend.m4. It is never actually | |
619 | # run, as this mode is specially recognized in the preamble. | |
620 | exit 1 | |
621 | ;; | |
622 | ||
623 | makedepend) | |
624 | "$@" || exit $? | |
625 | # Remove any Libtool call | |
626 | if test "$libtool" = yes; then | |
627 | while test "X$1" != 'X--mode=compile'; do | |
628 | shift | |
629 | done | |
630 | shift | |
631 | fi | |
632 | # X makedepend | |
633 | shift | |
634 | cleared=no eat=no | |
635 | for arg | |
636 | do | |
637 | case $cleared in | |
638 | no) | |
639 | set ""; shift | |
640 | cleared=yes ;; | |
641 | esac | |
642 | if test $eat = yes; then | |
643 | eat=no | |
644 | continue | |
645 | fi | |
646 | case "$arg" in | |
647 | -D*|-I*) | |
648 | set fnord "$@" "$arg"; shift ;; | |
649 | # Strip any option that makedepend may not understand. Remove | |
650 | # the object too, otherwise makedepend will parse it as a source file. | |
651 | -arch) | |
652 | eat=yes ;; | |
653 | -*|$object) | |
654 | ;; | |
655 | *) | |
656 | set fnord "$@" "$arg"; shift ;; | |
657 | esac | |
658 | done | |
659 | obj_suffix=`echo "$object" | sed 's/^.*\././'` | |
660 | touch "$tmpdepfile" | |
661 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" | |
662 | rm -f "$depfile" | |
663 | # makedepend may prepend the VPATH from the source file name to the object. | |
664 | # No need to regex-escape $object, excess matching of '.' is harmless. | |
665 | sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" | |
666 | # Some versions of the HPUX 10.20 sed can't process the last invocation | |
667 | # correctly. Breaking it into two sed invocations is a workaround. | |
668 | sed '1,2d' "$tmpdepfile" \ | |
669 | | tr ' ' "$nl" \ | |
670 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | |
671 | | sed -e 's/$/ :/' >> "$depfile" | |
672 | rm -f "$tmpdepfile" "$tmpdepfile".bak | |
673 | ;; | |
674 | ||
675 | cpp) | |
676 | # Important note: in order to support this mode, a compiler *must* | |
677 | # always write the preprocessed file to stdout. | |
678 | "$@" || exit $? | |
679 | ||
680 | # Remove the call to Libtool. | |
681 | if test "$libtool" = yes; then | |
682 | while test "X$1" != 'X--mode=compile'; do | |
683 | shift | |
684 | done | |
685 | shift | |
686 | fi | |
687 | ||
688 | # Remove '-o $object'. | |
689 | IFS=" " | |
690 | for arg | |
691 | do | |
692 | case $arg in | |
693 | -o) | |
694 | shift | |
695 | ;; | |
696 | $object) | |
697 | shift | |
698 | ;; | |
699 | *) | |
700 | set fnord "$@" "$arg" | |
701 | shift # fnord | |
702 | shift # $arg | |
703 | ;; | |
704 | esac | |
705 | done | |
706 | ||
707 | "$@" -E \ | |
708 | | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
709 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
710 | | sed '$ s: \\$::' > "$tmpdepfile" | |
711 | rm -f "$depfile" | |
712 | echo "$object : \\" > "$depfile" | |
713 | cat < "$tmpdepfile" >> "$depfile" | |
714 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" | |
715 | rm -f "$tmpdepfile" | |
716 | ;; | |
717 | ||
718 | msvisualcpp) | |
719 | # Important note: in order to support this mode, a compiler *must* | |
720 | # always write the preprocessed file to stdout. | |
721 | "$@" || exit $? | |
722 | ||
723 | # Remove the call to Libtool. | |
724 | if test "$libtool" = yes; then | |
725 | while test "X$1" != 'X--mode=compile'; do | |
726 | shift | |
727 | done | |
728 | shift | |
729 | fi | |
730 | ||
731 | IFS=" " | |
732 | for arg | |
733 | do | |
734 | case "$arg" in | |
735 | -o) | |
736 | shift | |
737 | ;; | |
738 | $object) | |
739 | shift | |
740 | ;; | |
741 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") | |
742 | set fnord "$@" | |
743 | shift | |
744 | shift | |
745 | ;; | |
746 | *) | |
747 | set fnord "$@" "$arg" | |
748 | shift | |
749 | shift | |
750 | ;; | |
751 | esac | |
752 | done | |
753 | "$@" -E 2>/dev/null | | |
754 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" | |
755 | rm -f "$depfile" | |
756 | echo "$object : \\" > "$depfile" | |
757 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" | |
758 | echo "$tab" >> "$depfile" | |
759 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" | |
760 | rm -f "$tmpdepfile" | |
761 | ;; | |
762 | ||
763 | msvcmsys) | |
764 | # This case exists only to let depend.m4 do its work. It works by | |
765 | # looking at the text of this script. This case will never be run, | |
766 | # since it is checked for above. | |
767 | exit 1 | |
768 | ;; | |
769 | ||
770 | none) | |
771 | exec "$@" | |
772 | ;; | |
773 | ||
774 | *) | |
775 | echo "Unknown depmode $depmode" 1>&2 | |
776 | exit 1 | |
777 | ;; | |
778 | esac | |
779 | ||
780 | exit 0 | |
781 | ||
782 | # Local Variables: | |
783 | # mode: shell-script | |
784 | # sh-indentation: 2 | |
785 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
786 | # time-stamp-start: "scriptversion=" | |
787 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
788 | # time-stamp-time-zone: "UTC0" | |
789 | # time-stamp-end: "; # UTC" | |
790 | # End: |
0 | #pragma once | |
1 | ||
2 | /** | |
3 | * Initialize the DPI setting. | |
4 | * This will use the 'Xft.dpi' X resource if available and fall back to | |
5 | * guessing the correct value otherwise. | |
6 | */ | |
7 | void init_dpi(void); | |
8 | ||
9 | /** | |
10 | * This function returns the value of the DPI setting. | |
11 | * | |
12 | */ | |
13 | long get_dpi_value(void); | |
14 | ||
15 | /** | |
16 | * Convert a logical amount of pixels (e.g. 2 pixels on a “standard” 96 DPI | |
17 | * screen) to a corresponding amount of physical pixels on a standard or retina | |
18 | * screen, e.g. 5 pixels on a 227 DPI MacBook Pro 13" Retina screen. | |
19 | * | |
20 | */ | |
21 | int logical_px(const int logical); |
27 | 27 | .RB [\|\-u\|] |
28 | 28 | .RB [\|\-e\|] |
29 | 29 | .RB [\|\-f\|] |
30 | ||
31 | .SH RECOMMENDED USAGE | |
32 | .RB xss-lock | |
33 | .RB --transfer-sleep-lock | |
34 | .RB -- | |
35 | .RB i3lock | |
36 | .RB --nofork | |
37 | ||
38 | Using | |
39 | .B xss-lock | |
40 | ensures that your screen is locked before your laptop suspends. | |
41 | ||
42 | Notably, using a systemd service file is not adequate, as it will not delay | |
43 | suspend until your screen is locked. | |
30 | 44 | |
31 | 45 | .SH DESCRIPTION |
32 | 46 | .B i3lock |
160 | 174 | The \-I (-\-inactivity-timeout=seconds) was removed because it only makes sense with DPMS. |
161 | 175 | |
162 | 176 | .SH SEE ALSO |
163 | .IR xautolock(1) | |
164 | \- use i3lock as your screen saver | |
177 | .IR xss-lock(1) | |
178 | \- hooks up i3lock to the systemd login manager | |
165 | 179 | |
166 | 180 | .IR convert(1) |
167 | 181 | \- feed a wide variety of image formats to i3lock |
56 | 56 | typedef void (*ev_callback_t)(EV_P_ ev_timer *w, int revents); |
57 | 57 | static void input_done(void); |
58 | 58 | |
59 | char color[7] = "ffffff"; | |
59 | char color[7] = "a3a3a3"; | |
60 | 60 | uint32_t last_resolution[2]; |
61 | 61 | xcb_window_t win; |
62 | 62 | static xcb_cursor_t cursor; |
82 | 82 | bool show_failed_attempts = false; |
83 | 83 | bool retry_verification = false; |
84 | 84 | |
85 | static struct xkb_state *xkb_state; | |
85 | struct xkb_state *xkb_state; | |
86 | 86 | static struct xkb_context *xkb_context; |
87 | static struct xkb_keymap *xkb_keymap; | |
87 | struct xkb_keymap *xkb_keymap; | |
88 | 88 | static struct xkb_compose_table *xkb_compose_table; |
89 | 89 | static struct xkb_compose_state *xkb_compose_state; |
90 | 90 | static uint8_t xkb_base_event; |
307 | 307 | if (debug_mode) |
308 | 308 | fprintf(stderr, "Authentication failure\n"); |
309 | 309 | |
310 | /* Get state of Caps and Num lock modifiers, to be displayed in | |
311 | * STATE_AUTH_WRONG state */ | |
312 | xkb_mod_index_t idx, num_mods; | |
313 | const char *mod_name; | |
314 | ||
315 | num_mods = xkb_keymap_num_mods(xkb_keymap); | |
316 | ||
317 | for (idx = 0; idx < num_mods; idx++) { | |
318 | if (!xkb_state_mod_index_is_active(xkb_state, idx, XKB_STATE_MODS_EFFECTIVE)) | |
319 | continue; | |
320 | ||
321 | mod_name = xkb_keymap_mod_get_name(xkb_keymap, idx); | |
322 | if (mod_name == NULL) | |
323 | continue; | |
324 | ||
325 | /* Replace certain xkb names with nicer, human-readable ones. */ | |
326 | if (strcmp(mod_name, XKB_MOD_NAME_CAPS) == 0) | |
327 | mod_name = "Caps Lock"; | |
328 | else if (strcmp(mod_name, XKB_MOD_NAME_ALT) == 0) | |
329 | mod_name = "Alt"; | |
330 | else if (strcmp(mod_name, XKB_MOD_NAME_NUM) == 0) | |
331 | mod_name = "Num Lock"; | |
332 | else if (strcmp(mod_name, XKB_MOD_NAME_LOGO) == 0) | |
333 | mod_name = "Super"; | |
334 | ||
335 | char *tmp; | |
336 | if (modifier_string == NULL) { | |
337 | if (asprintf(&tmp, "%s", mod_name) != -1) | |
338 | modifier_string = tmp; | |
339 | } else if (asprintf(&tmp, "%s, %s", modifier_string, mod_name) != -1) { | |
340 | free(modifier_string); | |
341 | modifier_string = tmp; | |
342 | } | |
343 | } | |
344 | ||
345 | 310 | auth_state = STATE_AUTH_WRONG; |
346 | 311 | failed_attempts += 1; |
347 | 312 | clear_input(); |
406 | 371 | return; |
407 | 372 | case XKB_COMPOSE_COMPOSED: |
408 | 373 | /* xkb_compose_state_get_utf8 doesn't include the terminating byte in the return value |
409 | * as xkb_keysym_to_utf8 does. Adding one makes the variable n consistent. */ | |
374 | * as xkb_keysym_to_utf8 does. Adding one makes the variable n consistent. */ | |
410 | 375 | n = xkb_compose_state_get_utf8(xkb_compose_state, buffer, sizeof(buffer)) + 1; |
411 | 376 | ksym = xkb_compose_state_get_one_sym(xkb_compose_state); |
412 | 377 | composed = true; |
0 | #ifndef _I3LOCK_H | |
1 | #define _I3LOCK_H | |
2 | ||
3 | /* This macro will only print debug output when started with --debug. | |
4 | * This is important because xautolock (for example) closes stdout/stderr by | |
5 | * default, so just printing something to stdout will lead to the data ending | |
6 | * up on the X11 socket (!). */ | |
7 | #define DEBUG(fmt, ...) \ | |
8 | do { \ | |
9 | if (debug_mode) { \ | |
10 | fprintf(stderr, "[i3lock-debug] " fmt, ##__VA_ARGS__); \ | |
11 | } \ | |
12 | } while (0) | |
13 | ||
14 | #endif |
0 | #ifndef _CURSORS_H | |
1 | #define _CURSORS_H | |
2 | ||
3 | #define CURS_NONE 0 | |
4 | #define CURS_WIN 1 | |
5 | #define CURS_DEFAULT 2 | |
6 | ||
7 | #endif |
0 | #pragma once | |
1 | ||
2 | /** | |
3 | * Initialize the DPI setting. | |
4 | * This will use the 'Xft.dpi' X resource if available and fall back to | |
5 | * guessing the correct value otherwise. | |
6 | */ | |
7 | void init_dpi(void); | |
8 | ||
9 | /** | |
10 | * This function returns the value of the DPI setting. | |
11 | * | |
12 | */ | |
13 | long get_dpi_value(void); | |
14 | ||
15 | /** | |
16 | * Convert a logical amount of pixels (e.g. 2 pixels on a “standard” 96 DPI | |
17 | * screen) to a corresponding amount of physical pixels on a standard or retina | |
18 | * screen, e.g. 5 pixels on a 227 DPI MacBook Pro 13" Retina screen. | |
19 | * | |
20 | */ | |
21 | int logical_px(const int logical); |
0 | #ifndef _I3LOCK_H | |
1 | #define _I3LOCK_H | |
2 | ||
3 | /* This macro will only print debug output when started with --debug. | |
4 | * This is important because xautolock (for example) closes stdout/stderr by | |
5 | * default, so just printing something to stdout will lead to the data ending | |
6 | * up on the X11 socket (!). */ | |
7 | #define DEBUG(fmt, ...) \ | |
8 | do { \ | |
9 | if (debug_mode) { \ | |
10 | fprintf(stderr, "[i3lock-debug] " fmt, ##__VA_ARGS__); \ | |
11 | } \ | |
12 | } while (0) | |
13 | ||
14 | #endif |
0 | #ifndef _XINERAMA_H | |
1 | #define _XINERAMA_H | |
2 | ||
3 | typedef struct Rect { | |
4 | int16_t x; | |
5 | int16_t y; | |
6 | uint16_t width; | |
7 | uint16_t height; | |
8 | } Rect; | |
9 | ||
10 | extern int xr_screens; | |
11 | extern Rect *xr_resolutions; | |
12 | ||
13 | void randr_init(int *event_base, xcb_window_t root); | |
14 | void randr_query(xcb_window_t root); | |
15 | ||
16 | #endif |
0 | #ifndef _UNLOCK_INDICATOR_H | |
1 | #define _UNLOCK_INDICATOR_H | |
2 | ||
3 | #include <xcb/xcb.h> | |
4 | ||
5 | typedef enum { | |
6 | STATE_STARTED = 0, /* default state */ | |
7 | STATE_KEY_PRESSED = 1, /* key was pressed, show unlock indicator */ | |
8 | STATE_KEY_ACTIVE = 2, /* a key was pressed recently, highlight part | |
9 | of the unlock indicator. */ | |
10 | STATE_BACKSPACE_ACTIVE = 3, /* backspace was pressed recently, highlight | |
11 | part of the unlock indicator in red. */ | |
12 | STATE_NOTHING_TO_DELETE = 4, /* backspace was pressed, but there is nothing to delete. */ | |
13 | } unlock_state_t; | |
14 | ||
15 | typedef enum { | |
16 | STATE_AUTH_IDLE = 0, /* no authenticator interaction at the moment */ | |
17 | STATE_AUTH_VERIFY = 1, /* currently verifying the password via authenticator */ | |
18 | STATE_AUTH_LOCK = 2, /* currently locking the screen */ | |
19 | STATE_AUTH_WRONG = 3, /* the password was wrong */ | |
20 | STATE_I3LOCK_LOCK_FAILED = 4, /* i3lock failed to load */ | |
21 | } auth_state_t; | |
22 | ||
23 | void free_bg_pixmap(void); | |
24 | void draw_image(xcb_pixmap_t bg_pixmap, uint32_t* resolution); | |
25 | void redraw_screen(void); | |
26 | void clear_indicator(void); | |
27 | ||
28 | #endif |
0 | #ifndef _XCB_H | |
1 | #define _XCB_H | |
2 | ||
3 | #include <xcb/xcb.h> | |
4 | ||
5 | extern xcb_connection_t *conn; | |
6 | extern xcb_screen_t *screen; | |
7 | ||
8 | xcb_visualtype_t *get_root_visual_type(xcb_screen_t *s); | |
9 | xcb_pixmap_t create_bg_pixmap(xcb_connection_t *conn, xcb_screen_t *scr, u_int32_t *resolution, char *color); | |
10 | xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, char *color, xcb_pixmap_t pixmap); | |
11 | bool grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb_cursor_t cursor, int tries); | |
12 | xcb_cursor_t create_cursor(xcb_connection_t *conn, xcb_screen_t *screen, xcb_window_t win, int choice); | |
13 | xcb_window_t find_focused_window(xcb_connection_t *conn, const xcb_window_t root); | |
14 | void set_focused_window(xcb_connection_t *conn, const xcb_window_t root, const xcb_window_t window); | |
15 | ||
16 | #endif |
0 | #!/bin/sh | |
1 | # install - install a program, script, or datafile | |
2 | ||
3 | scriptversion=2018-03-11.20; # UTC | |
4 | ||
5 | # This originates from X11R5 (mit/util/scripts/install.sh), which was | |
6 | # later released in X11R6 (xc/config/util/install.sh) with the | |
7 | # following copyright and license. | |
8 | # | |
9 | # Copyright (C) 1994 X Consortium | |
10 | # | |
11 | # Permission is hereby granted, free of charge, to any person obtaining a copy | |
12 | # of this software and associated documentation files (the "Software"), to | |
13 | # deal in the Software without restriction, including without limitation the | |
14 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
15 | # sell copies of the Software, and to permit persons to whom the Software is | |
16 | # furnished to do so, subject to the following conditions: | |
17 | # | |
18 | # The above copyright notice and this permission notice shall be included in | |
19 | # all copies or substantial portions of the Software. | |
20 | # | |
21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
22 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
23 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
24 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |
25 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | |
26 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
27 | # | |
28 | # Except as contained in this notice, the name of the X Consortium shall not | |
29 | # be used in advertising or otherwise to promote the sale, use or other deal- | |
30 | # ings in this Software without prior written authorization from the X Consor- | |
31 | # tium. | |
32 | # | |
33 | # | |
34 | # FSF changes to this file are in the public domain. | |
35 | # | |
36 | # Calling this script install-sh is preferred over install.sh, to prevent | |
37 | # 'make' implicit rules from creating a file called install from it | |
38 | # when there is no Makefile. | |
39 | # | |
40 | # This script is compatible with the BSD install script, but was written | |
41 | # from scratch. | |
42 | ||
43 | tab=' ' | |
44 | nl=' | |
45 | ' | |
46 | IFS=" $tab$nl" | |
47 | ||
48 | # Set DOITPROG to "echo" to test this script. | |
49 | ||
50 | doit=${DOITPROG-} | |
51 | doit_exec=${doit:-exec} | |
52 | ||
53 | # Put in absolute file names if you don't have them in your path; | |
54 | # or use environment vars. | |
55 | ||
56 | chgrpprog=${CHGRPPROG-chgrp} | |
57 | chmodprog=${CHMODPROG-chmod} | |
58 | chownprog=${CHOWNPROG-chown} | |
59 | cmpprog=${CMPPROG-cmp} | |
60 | cpprog=${CPPROG-cp} | |
61 | mkdirprog=${MKDIRPROG-mkdir} | |
62 | mvprog=${MVPROG-mv} | |
63 | rmprog=${RMPROG-rm} | |
64 | stripprog=${STRIPPROG-strip} | |
65 | ||
66 | posix_mkdir= | |
67 | ||
68 | # Desired mode of installed file. | |
69 | mode=0755 | |
70 | ||
71 | chgrpcmd= | |
72 | chmodcmd=$chmodprog | |
73 | chowncmd= | |
74 | mvcmd=$mvprog | |
75 | rmcmd="$rmprog -f" | |
76 | stripcmd= | |
77 | ||
78 | src= | |
79 | dst= | |
80 | dir_arg= | |
81 | dst_arg= | |
82 | ||
83 | copy_on_change=false | |
84 | is_target_a_directory=possibly | |
85 | ||
86 | usage="\ | |
87 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | |
88 | or: $0 [OPTION]... SRCFILES... DIRECTORY | |
89 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... | |
90 | or: $0 [OPTION]... -d DIRECTORIES... | |
91 | ||
92 | In the 1st form, copy SRCFILE to DSTFILE. | |
93 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. | |
94 | In the 4th, create DIRECTORIES. | |
95 | ||
96 | Options: | |
97 | --help display this help and exit. | |
98 | --version display version info and exit. | |
99 | ||
100 | -c (ignored) | |
101 | -C install only if different (preserve the last data modification time) | |
102 | -d create directories instead of installing files. | |
103 | -g GROUP $chgrpprog installed files to GROUP. | |
104 | -m MODE $chmodprog installed files to MODE. | |
105 | -o USER $chownprog installed files to USER. | |
106 | -s $stripprog installed files. | |
107 | -t DIRECTORY install into DIRECTORY. | |
108 | -T report an error if DSTFILE is a directory. | |
109 | ||
110 | Environment variables override the default commands: | |
111 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG | |
112 | RMPROG STRIPPROG | |
113 | " | |
114 | ||
115 | while test $# -ne 0; do | |
116 | case $1 in | |
117 | -c) ;; | |
118 | ||
119 | -C) copy_on_change=true;; | |
120 | ||
121 | -d) dir_arg=true;; | |
122 | ||
123 | -g) chgrpcmd="$chgrpprog $2" | |
124 | shift;; | |
125 | ||
126 | --help) echo "$usage"; exit $?;; | |
127 | ||
128 | -m) mode=$2 | |
129 | case $mode in | |
130 | *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) | |
131 | echo "$0: invalid mode: $mode" >&2 | |
132 | exit 1;; | |
133 | esac | |
134 | shift;; | |
135 | ||
136 | -o) chowncmd="$chownprog $2" | |
137 | shift;; | |
138 | ||
139 | -s) stripcmd=$stripprog;; | |
140 | ||
141 | -t) | |
142 | is_target_a_directory=always | |
143 | dst_arg=$2 | |
144 | # Protect names problematic for 'test' and other utilities. | |
145 | case $dst_arg in | |
146 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
147 | esac | |
148 | shift;; | |
149 | ||
150 | -T) is_target_a_directory=never;; | |
151 | ||
152 | --version) echo "$0 $scriptversion"; exit $?;; | |
153 | ||
154 | --) shift | |
155 | break;; | |
156 | ||
157 | -*) echo "$0: invalid option: $1" >&2 | |
158 | exit 1;; | |
159 | ||
160 | *) break;; | |
161 | esac | |
162 | shift | |
163 | done | |
164 | ||
165 | # We allow the use of options -d and -T together, by making -d | |
166 | # take the precedence; this is for compatibility with GNU install. | |
167 | ||
168 | if test -n "$dir_arg"; then | |
169 | if test -n "$dst_arg"; then | |
170 | echo "$0: target directory not allowed when installing a directory." >&2 | |
171 | exit 1 | |
172 | fi | |
173 | fi | |
174 | ||
175 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then | |
176 | # When -d is used, all remaining arguments are directories to create. | |
177 | # When -t is used, the destination is already specified. | |
178 | # Otherwise, the last argument is the destination. Remove it from $@. | |
179 | for arg | |
180 | do | |
181 | if test -n "$dst_arg"; then | |
182 | # $@ is not empty: it contains at least $arg. | |
183 | set fnord "$@" "$dst_arg" | |
184 | shift # fnord | |
185 | fi | |
186 | shift # arg | |
187 | dst_arg=$arg | |
188 | # Protect names problematic for 'test' and other utilities. | |
189 | case $dst_arg in | |
190 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
191 | esac | |
192 | done | |
193 | fi | |
194 | ||
195 | if test $# -eq 0; then | |
196 | if test -z "$dir_arg"; then | |
197 | echo "$0: no input file specified." >&2 | |
198 | exit 1 | |
199 | fi | |
200 | # It's OK to call 'install-sh -d' without argument. | |
201 | # This can happen when creating conditional directories. | |
202 | exit 0 | |
203 | fi | |
204 | ||
205 | if test -z "$dir_arg"; then | |
206 | if test $# -gt 1 || test "$is_target_a_directory" = always; then | |
207 | if test ! -d "$dst_arg"; then | |
208 | echo "$0: $dst_arg: Is not a directory." >&2 | |
209 | exit 1 | |
210 | fi | |
211 | fi | |
212 | fi | |
213 | ||
214 | if test -z "$dir_arg"; then | |
215 | do_exit='(exit $ret); exit $ret' | |
216 | trap "ret=129; $do_exit" 1 | |
217 | trap "ret=130; $do_exit" 2 | |
218 | trap "ret=141; $do_exit" 13 | |
219 | trap "ret=143; $do_exit" 15 | |
220 | ||
221 | # Set umask so as not to create temps with too-generous modes. | |
222 | # However, 'strip' requires both read and write access to temps. | |
223 | case $mode in | |
224 | # Optimize common cases. | |
225 | *644) cp_umask=133;; | |
226 | *755) cp_umask=22;; | |
227 | ||
228 | *[0-7]) | |
229 | if test -z "$stripcmd"; then | |
230 | u_plus_rw= | |
231 | else | |
232 | u_plus_rw='% 200' | |
233 | fi | |
234 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; | |
235 | *) | |
236 | if test -z "$stripcmd"; then | |
237 | u_plus_rw= | |
238 | else | |
239 | u_plus_rw=,u+rw | |
240 | fi | |
241 | cp_umask=$mode$u_plus_rw;; | |
242 | esac | |
243 | fi | |
244 | ||
245 | for src | |
246 | do | |
247 | # Protect names problematic for 'test' and other utilities. | |
248 | case $src in | |
249 | -* | [=\(\)!]) src=./$src;; | |
250 | esac | |
251 | ||
252 | if test -n "$dir_arg"; then | |
253 | dst=$src | |
254 | dstdir=$dst | |
255 | test -d "$dstdir" | |
256 | dstdir_status=$? | |
257 | else | |
258 | ||
259 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command | |
260 | # might cause directories to be created, which would be especially bad | |
261 | # if $src (and thus $dsttmp) contains '*'. | |
262 | if test ! -f "$src" && test ! -d "$src"; then | |
263 | echo "$0: $src does not exist." >&2 | |
264 | exit 1 | |
265 | fi | |
266 | ||
267 | if test -z "$dst_arg"; then | |
268 | echo "$0: no destination specified." >&2 | |
269 | exit 1 | |
270 | fi | |
271 | dst=$dst_arg | |
272 | ||
273 | # If destination is a directory, append the input filename. | |
274 | if test -d "$dst"; then | |
275 | if test "$is_target_a_directory" = never; then | |
276 | echo "$0: $dst_arg: Is a directory" >&2 | |
277 | exit 1 | |
278 | fi | |
279 | dstdir=$dst | |
280 | dstbase=`basename "$src"` | |
281 | case $dst in | |
282 | */) dst=$dst$dstbase;; | |
283 | *) dst=$dst/$dstbase;; | |
284 | esac | |
285 | dstdir_status=0 | |
286 | else | |
287 | dstdir=`dirname "$dst"` | |
288 | test -d "$dstdir" | |
289 | dstdir_status=$? | |
290 | fi | |
291 | fi | |
292 | ||
293 | case $dstdir in | |
294 | */) dstdirslash=$dstdir;; | |
295 | *) dstdirslash=$dstdir/;; | |
296 | esac | |
297 | ||
298 | obsolete_mkdir_used=false | |
299 | ||
300 | if test $dstdir_status != 0; then | |
301 | case $posix_mkdir in | |
302 | '') | |
303 | # Create intermediate dirs using mode 755 as modified by the umask. | |
304 | # This is like FreeBSD 'install' as of 1997-10-28. | |
305 | umask=`umask` | |
306 | case $stripcmd.$umask in | |
307 | # Optimize common cases. | |
308 | *[2367][2367]) mkdir_umask=$umask;; | |
309 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
310 | ||
311 | *[0-7]) | |
312 | mkdir_umask=`expr $umask + 22 \ | |
313 | - $umask % 100 % 40 + $umask % 20 \ | |
314 | - $umask % 10 % 4 + $umask % 2 | |
315 | `;; | |
316 | *) mkdir_umask=$umask,go-w;; | |
317 | esac | |
318 | ||
319 | # With -d, create the new directory with the user-specified mode. | |
320 | # Otherwise, rely on $mkdir_umask. | |
321 | if test -n "$dir_arg"; then | |
322 | mkdir_mode=-m$mode | |
323 | else | |
324 | mkdir_mode= | |
325 | fi | |
326 | ||
327 | posix_mkdir=false | |
328 | case $umask in | |
329 | *[123567][0-7][0-7]) | |
330 | # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
331 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
332 | ;; | |
333 | *) | |
334 | # Note that $RANDOM variable is not portable (e.g. dash); Use it | |
335 | # here however when possible just to lower collision chance. | |
336 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
337 | ||
338 | trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
339 | ||
340 | # Because "mkdir -p" follows existing symlinks and we likely work | |
341 | # directly in world-writeable /tmp, make sure that the '$tmpdir' | |
342 | # directory is successfully created first before we actually test | |
343 | # 'mkdir -p' feature. | |
344 | if (umask $mkdir_umask && | |
345 | $mkdirprog $mkdir_mode "$tmpdir" && | |
346 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 | |
347 | then | |
348 | if test -z "$dir_arg" || { | |
349 | # Check for POSIX incompatibilities with -m. | |
350 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
351 | # other-writable bit of parent directory when it shouldn't. | |
352 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
353 | test_tmpdir="$tmpdir/a" | |
354 | ls_ld_tmpdir=`ls -ld "$test_tmpdir"` | |
355 | case $ls_ld_tmpdir in | |
356 | d????-?r-*) different_mode=700;; | |
357 | d????-?--*) different_mode=755;; | |
358 | *) false;; | |
359 | esac && | |
360 | $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { | |
361 | ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` | |
362 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
363 | } | |
364 | } | |
365 | then posix_mkdir=: | |
366 | fi | |
367 | rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" | |
368 | else | |
369 | # Remove any dirs left behind by ancient mkdir implementations. | |
370 | rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null | |
371 | fi | |
372 | trap '' 0;; | |
373 | esac;; | |
374 | esac | |
375 | ||
376 | if | |
377 | $posix_mkdir && ( | |
378 | umask $mkdir_umask && | |
379 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
380 | ) | |
381 | then : | |
382 | else | |
383 | ||
384 | # The umask is ridiculous, or mkdir does not conform to POSIX, | |
385 | # or it failed possibly due to a race condition. Create the | |
386 | # directory the slow way, step by step, checking for races as we go. | |
387 | ||
388 | case $dstdir in | |
389 | /*) prefix='/';; | |
390 | [-=\(\)!]*) prefix='./';; | |
391 | *) prefix='';; | |
392 | esac | |
393 | ||
394 | oIFS=$IFS | |
395 | IFS=/ | |
396 | set -f | |
397 | set fnord $dstdir | |
398 | shift | |
399 | set +f | |
400 | IFS=$oIFS | |
401 | ||
402 | prefixes= | |
403 | ||
404 | for d | |
405 | do | |
406 | test X"$d" = X && continue | |
407 | ||
408 | prefix=$prefix$d | |
409 | if test -d "$prefix"; then | |
410 | prefixes= | |
411 | else | |
412 | if $posix_mkdir; then | |
413 | (umask=$mkdir_umask && | |
414 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
415 | # Don't fail if two instances are running concurrently. | |
416 | test -d "$prefix" || exit 1 | |
417 | else | |
418 | case $prefix in | |
419 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
420 | *) qprefix=$prefix;; | |
421 | esac | |
422 | prefixes="$prefixes '$qprefix'" | |
423 | fi | |
424 | fi | |
425 | prefix=$prefix/ | |
426 | done | |
427 | ||
428 | if test -n "$prefixes"; then | |
429 | # Don't fail if two instances are running concurrently. | |
430 | (umask $mkdir_umask && | |
431 | eval "\$doit_exec \$mkdirprog $prefixes") || | |
432 | test -d "$dstdir" || exit 1 | |
433 | obsolete_mkdir_used=true | |
434 | fi | |
435 | fi | |
436 | fi | |
437 | ||
438 | if test -n "$dir_arg"; then | |
439 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && | |
440 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && | |
441 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || | |
442 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 | |
443 | else | |
444 | ||
445 | # Make a couple of temp file names in the proper directory. | |
446 | dsttmp=${dstdirslash}_inst.$$_ | |
447 | rmtmp=${dstdirslash}_rm.$$_ | |
448 | ||
449 | # Trap to clean up those temp files at exit. | |
450 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 | |
451 | ||
452 | # Copy the file name to the temp name. | |
453 | (umask $cp_umask && | |
454 | { test -z "$stripcmd" || { | |
455 | # Create $dsttmp read-write so that cp doesn't create it read-only, | |
456 | # which would cause strip to fail. | |
457 | if test -z "$doit"; then | |
458 | : >"$dsttmp" # No need to fork-exec 'touch'. | |
459 | else | |
460 | $doit touch "$dsttmp" | |
461 | fi | |
462 | } | |
463 | } && | |
464 | $doit_exec $cpprog "$src" "$dsttmp") && | |
465 | ||
466 | # and set any options; do chmod last to preserve setuid bits. | |
467 | # | |
468 | # If any of these fail, we abort the whole thing. If we want to | |
469 | # ignore errors from any of these, just make sure not to ignore | |
470 | # errors from the above "$doit $cpprog $src $dsttmp" command. | |
471 | # | |
472 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && | |
473 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && | |
474 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && | |
475 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && | |
476 | ||
477 | # If -C, don't bother to copy if it wouldn't change the file. | |
478 | if $copy_on_change && | |
479 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
480 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
481 | set -f && | |
482 | set X $old && old=:$2:$4:$5:$6 && | |
483 | set X $new && new=:$2:$4:$5:$6 && | |
484 | set +f && | |
485 | test "$old" = "$new" && | |
486 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 | |
487 | then | |
488 | rm -f "$dsttmp" | |
489 | else | |
490 | # Rename the file to the real destination. | |
491 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || | |
492 | ||
493 | # The rename failed, perhaps because mv can't rename something else | |
494 | # to itself, or perhaps because mv is so ancient that it does not | |
495 | # support -f. | |
496 | { | |
497 | # Now remove or move aside any old file at destination location. | |
498 | # We try this two ways since rm can't unlink itself on some | |
499 | # systems and the destination file might be busy for other | |
500 | # reasons. In this case, the final cleanup might fail but the new | |
501 | # file should still install successfully. | |
502 | { | |
503 | test ! -f "$dst" || | |
504 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
505 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
506 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
507 | } || | |
508 | { echo "$0: cannot unlink or rename $dst" >&2 | |
509 | (exit 1); exit 1 | |
510 | } | |
511 | } && | |
512 | ||
513 | # Now rename the file to the real destination. | |
514 | $doit $mvcmd "$dsttmp" "$dst" | |
515 | } | |
516 | fi || exit 1 | |
517 | ||
518 | trap '' 0 | |
519 | fi | |
520 | done | |
521 | ||
522 | # Local variables: | |
523 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
524 | # time-stamp-start: "scriptversion=" | |
525 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
526 | # time-stamp-time-zone: "UTC0" | |
527 | # time-stamp-end: "; # UTC" | |
528 | # End: |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_append_flag.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # FLAG is appended to the FLAGS-VARIABLE shell variable, with a space | |
11 | # added in between. | |
12 | # | |
13 | # If FLAGS-VARIABLE is not specified, the current language's flags (e.g. | |
14 | # CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains | |
15 | # FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly | |
16 | # FLAG. | |
17 | # | |
18 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. | |
19 | # | |
20 | # LICENSE | |
21 | # | |
22 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | |
23 | # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | |
24 | # | |
25 | # This program is free software: you can redistribute it and/or modify it | |
26 | # under the terms of the GNU General Public License as published by the | |
27 | # Free Software Foundation, either version 3 of the License, or (at your | |
28 | # option) any later version. | |
29 | # | |
30 | # This program is distributed in the hope that it will be useful, but | |
31 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
32 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
33 | # Public License for more details. | |
34 | # | |
35 | # You should have received a copy of the GNU General Public License along | |
36 | # with this program. If not, see <http://www.gnu.org/licenses/>. | |
37 | # | |
38 | # As a special exception, the respective Autoconf Macro's copyright owner | |
39 | # gives unlimited permission to copy, distribute and modify the configure | |
40 | # scripts that are the output of Autoconf when processing the Macro. You | |
41 | # need not follow the terms of the GNU General Public License when using | |
42 | # or distributing such scripts, even though portions of the text of the | |
43 | # Macro appear in them. The GNU General Public License (GPL) does govern | |
44 | # all other use of the material that constitutes the Autoconf Macro. | |
45 | # | |
46 | # This special exception to the GPL applies to versions of the Autoconf | |
47 | # Macro released by the Autoconf Archive. When you make and distribute a | |
48 | # modified version of the Autoconf Macro, you may extend this special | |
49 | # exception to the GPL to apply to your modified version as well. | |
50 | ||
51 | #serial 6 | |
52 | ||
53 | AC_DEFUN([AX_APPEND_FLAG], | |
54 | [dnl | |
55 | AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF | |
56 | AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) | |
57 | AS_VAR_SET_IF(FLAGS,[ | |
58 | AS_CASE([" AS_VAR_GET(FLAGS) "], | |
59 | [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], | |
60 | [ | |
61 | AS_VAR_APPEND(FLAGS,[" $1"]) | |
62 | AC_RUN_LOG([: FLAGS="$FLAGS"]) | |
63 | ]) | |
64 | ], | |
65 | [ | |
66 | AS_VAR_SET(FLAGS,[$1]) | |
67 | AC_RUN_LOG([: FLAGS="$FLAGS"]) | |
68 | ]) | |
69 | AS_VAR_POPDEF([FLAGS])dnl | |
70 | ])dnl AX_APPEND_FLAG |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] | |
7 | # AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] | |
8 | # AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] | |
9 | # | |
10 | # DESCRIPTION | |
11 | # | |
12 | # Try to find a compiler option that enables most reasonable warnings. | |
13 | # | |
14 | # For the GNU compiler it will be -Wall (and -ansi -pedantic) The result | |
15 | # is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default. | |
16 | # | |
17 | # Currently this macro knows about the GCC, Solaris, Digital Unix, AIX, | |
18 | # HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and | |
19 | # Intel compilers. For a given compiler, the Fortran flags are much more | |
20 | # experimental than their C equivalents. | |
21 | # | |
22 | # - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS | |
23 | # - $2 add-value-if-not-found : nothing | |
24 | # - $3 action-if-found : add value to shellvariable | |
25 | # - $4 action-if-not-found : nothing | |
26 | # | |
27 | # NOTE: These macros depend on AX_APPEND_FLAG. | |
28 | # | |
29 | # LICENSE | |
30 | # | |
31 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | |
32 | # Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com> | |
33 | # | |
34 | # This program is free software; you can redistribute it and/or modify it | |
35 | # under the terms of the GNU General Public License as published by the | |
36 | # Free Software Foundation; either version 3 of the License, or (at your | |
37 | # option) any later version. | |
38 | # | |
39 | # This program is distributed in the hope that it will be useful, but | |
40 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
41 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
42 | # Public License for more details. | |
43 | # | |
44 | # You should have received a copy of the GNU General Public License along | |
45 | # with this program. If not, see <http://www.gnu.org/licenses/>. | |
46 | # | |
47 | # As a special exception, the respective Autoconf Macro's copyright owner | |
48 | # gives unlimited permission to copy, distribute and modify the configure | |
49 | # scripts that are the output of Autoconf when processing the Macro. You | |
50 | # need not follow the terms of the GNU General Public License when using | |
51 | # or distributing such scripts, even though portions of the text of the | |
52 | # Macro appear in them. The GNU General Public License (GPL) does govern | |
53 | # all other use of the material that constitutes the Autoconf Macro. | |
54 | # | |
55 | # This special exception to the GPL applies to versions of the Autoconf | |
56 | # Macro released by the Autoconf Archive. When you make and distribute a | |
57 | # modified version of the Autoconf Macro, you may extend this special | |
58 | # exception to the GPL to apply to your modified version as well. | |
59 | ||
60 | #serial 15 | |
61 | ||
62 | AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl | |
63 | AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl | |
64 | AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl | |
65 | AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], | |
66 | VAR,[VAR="no, unknown" | |
67 | ac_save_[]FLAGS="$[]FLAGS" | |
68 | for ac_arg dnl | |
69 | in "-warn all % -warn all" dnl Intel | |
70 | "-pedantic % -Wall" dnl GCC | |
71 | "-xstrconst % -v" dnl Solaris C | |
72 | "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix | |
73 | "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX | |
74 | "-ansi -ansiE % -fullwarn" dnl IRIX | |
75 | "+ESlit % +w1" dnl HP-UX C | |
76 | "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) | |
77 | "-h conform % -h msglevel 2" dnl Cray C (Unicos) | |
78 | # | |
79 | do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` | |
80 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM], | |
81 | [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) | |
82 | done | |
83 | FLAGS="$ac_save_[]FLAGS" | |
84 | ]) | |
85 | AS_VAR_POPDEF([FLAGS])dnl | |
86 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | |
87 | case ".$VAR" in | |
88 | .ok|.ok,*) m4_ifvaln($3,$3) ;; | |
89 | .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;; | |
90 | *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;; | |
91 | esac | |
92 | AS_VAR_POPDEF([VAR])dnl | |
93 | ])dnl AX_FLAGS_WARN_ALL | |
94 | dnl implementation tactics: | |
95 | dnl the for-argument contains a list of options. The first part of | |
96 | dnl these does only exist to detect the compiler - usually it is | |
97 | dnl a global option to enable -ansi or -extrawarnings. All other | |
98 | dnl compilers will fail about it. That was needed since a lot of | |
99 | dnl compilers will give false positives for some option-syntax | |
100 | dnl like -Woption or -Xoption as they think of it is a pass-through | |
101 | dnl to later compile stages or something. The "%" is used as a | |
102 | dnl delimiter. A non-option comment can be given after "%%" marks | |
103 | dnl which will be shown but not added to the respective C/CXXFLAGS. | |
104 | ||
105 | AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl | |
106 | AC_LANG_PUSH([C]) | |
107 | AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) | |
108 | AC_LANG_POP([C]) | |
109 | ]) | |
110 | ||
111 | AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl | |
112 | AC_LANG_PUSH([C++]) | |
113 | AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) | |
114 | AC_LANG_POP([C++]) | |
115 | ]) | |
116 | ||
117 | AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl | |
118 | AC_LANG_PUSH([Fortran]) | |
119 | AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) | |
120 | AC_LANG_POP([Fortran]) | |
121 | ]) |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # Check whether the given FLAG works with the current language's compiler | |
11 | # or gives an error. (Warnings, however, are ignored) | |
12 | # | |
13 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | |
14 | # success/failure. | |
15 | # | |
16 | # If EXTRA-FLAGS is defined, it is added to the current language's default | |
17 | # flags (e.g. CFLAGS) when the check is done. The check is thus made with | |
18 | # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to | |
19 | # force the compiler to issue an error when a bad flag is given. | |
20 | # | |
21 | # INPUT gives an alternative input source to AC_COMPILE_IFELSE. | |
22 | # | |
23 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | |
24 | # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. | |
25 | # | |
26 | # LICENSE | |
27 | # | |
28 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | |
29 | # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | |
30 | # | |
31 | # This program is free software: you can redistribute it and/or modify it | |
32 | # under the terms of the GNU General Public License as published by the | |
33 | # Free Software Foundation, either version 3 of the License, or (at your | |
34 | # option) any later version. | |
35 | # | |
36 | # This program is distributed in the hope that it will be useful, but | |
37 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
38 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
39 | # Public License for more details. | |
40 | # | |
41 | # You should have received a copy of the GNU General Public License along | |
42 | # with this program. If not, see <http://www.gnu.org/licenses/>. | |
43 | # | |
44 | # As a special exception, the respective Autoconf Macro's copyright owner | |
45 | # gives unlimited permission to copy, distribute and modify the configure | |
46 | # scripts that are the output of Autoconf when processing the Macro. You | |
47 | # need not follow the terms of the GNU General Public License when using | |
48 | # or distributing such scripts, even though portions of the text of the | |
49 | # Macro appear in them. The GNU General Public License (GPL) does govern | |
50 | # all other use of the material that constitutes the Autoconf Macro. | |
51 | # | |
52 | # This special exception to the GPL applies to versions of the Autoconf | |
53 | # Macro released by the Autoconf Archive. When you make and distribute a | |
54 | # modified version of the Autoconf Macro, you may extend this special | |
55 | # exception to the GPL to apply to your modified version as well. | |
56 | ||
57 | #serial 4 | |
58 | ||
59 | AC_DEFUN([AX_CHECK_COMPILE_FLAG], | |
60 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF | |
61 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl | |
62 | AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ | |
63 | ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS | |
64 | _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" | |
65 | AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], | |
66 | [AS_VAR_SET(CACHEVAR,[yes])], | |
67 | [AS_VAR_SET(CACHEVAR,[no])]) | |
68 | _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) | |
69 | AS_VAR_IF(CACHEVAR,yes, | |
70 | [m4_default([$2], :)], | |
71 | [m4_default([$3], :)]) | |
72 | AS_VAR_POPDEF([CACHEVAR])dnl | |
73 | ])dnl AX_CHECK_COMPILE_FLAGS |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_check_enable_debug.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CHECK_ENABLE_DEBUG([enable by default=yes/info/profile/no], [ENABLE DEBUG VARIABLES ...], [DISABLE DEBUG VARIABLES NDEBUG ...], [IS-RELEASE]) | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # Check for the presence of an --enable-debug option to configure, with | |
11 | # the specified default value used when the option is not present. Return | |
12 | # the value in the variable $ax_enable_debug. | |
13 | # | |
14 | # Specifying 'yes' adds '-g -O0' to the compilation flags for all | |
15 | # languages. Specifying 'info' adds '-g' to the compilation flags. | |
16 | # Specifying 'profile' adds '-g -pg' to the compilation flags and '-pg' to | |
17 | # the linking flags. Otherwise, nothing is added. | |
18 | # | |
19 | # Define the variables listed in the second argument if debug is enabled, | |
20 | # defaulting to no variables. Defines the variables listed in the third | |
21 | # argument if debug is disabled, defaulting to NDEBUG. All lists of | |
22 | # variables should be space-separated. | |
23 | # | |
24 | # If debug is not enabled, ensure AC_PROG_* will not add debugging flags. | |
25 | # Should be invoked prior to any AC_PROG_* compiler checks. | |
26 | # | |
27 | # IS-RELEASE can be used to change the default to 'no' when making a | |
28 | # release. Set IS-RELEASE to 'yes' or 'no' as appropriate. By default, it | |
29 | # uses the value of $ax_is_release, so if you are using the AX_IS_RELEASE | |
30 | # macro, there is no need to pass this parameter. | |
31 | # | |
32 | # AX_IS_RELEASE([git-directory]) | |
33 | # AX_CHECK_ENABLE_DEBUG() | |
34 | # | |
35 | # LICENSE | |
36 | # | |
37 | # Copyright (c) 2011 Rhys Ulerich <rhys.ulerich@gmail.com> | |
38 | # Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk> | |
39 | # | |
40 | # Copying and distribution of this file, with or without modification, are | |
41 | # permitted in any medium without royalty provided the copyright notice | |
42 | # and this notice are preserved. | |
43 | ||
44 | #serial 5 | |
45 | ||
46 | AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[ | |
47 | AC_BEFORE([$0],[AC_PROG_CC])dnl | |
48 | AC_BEFORE([$0],[AC_PROG_CXX])dnl | |
49 | AC_BEFORE([$0],[AC_PROG_F77])dnl | |
50 | AC_BEFORE([$0],[AC_PROG_FC])dnl | |
51 | ||
52 | AC_MSG_CHECKING(whether to enable debugging) | |
53 | ||
54 | ax_enable_debug_default=m4_tolower(m4_normalize(ifelse([$1],,[no],[$1]))) | |
55 | ax_enable_debug_is_release=m4_tolower(m4_normalize(ifelse([$4],, | |
56 | [$ax_is_release], | |
57 | [$4]))) | |
58 | ||
59 | # If this is a release, override the default. | |
60 | AS_IF([test "$ax_enable_debug_is_release" = "yes"], | |
61 | [ax_enable_debug_default="no"]) | |
62 | ||
63 | m4_define(ax_enable_debug_vars,[m4_normalize(ifelse([$2],,,[$2]))]) | |
64 | m4_define(ax_disable_debug_vars,[m4_normalize(ifelse([$3],,[NDEBUG],[$3]))]) | |
65 | ||
66 | AC_ARG_ENABLE(debug, | |
67 | [AS_HELP_STRING([--enable-debug=]@<:@yes/info/profile/no@:>@,[compile with debugging])], | |
68 | [],enable_debug=$ax_enable_debug_default) | |
69 | ||
70 | # empty mean debug yes | |
71 | AS_IF([test "x$enable_debug" = "x"], | |
72 | [enable_debug="yes"]) | |
73 | ||
74 | # case of debug | |
75 | AS_CASE([$enable_debug], | |
76 | [yes],[ | |
77 | AC_MSG_RESULT(yes) | |
78 | CFLAGS="${CFLAGS} -g -O0" | |
79 | CXXFLAGS="${CXXFLAGS} -g -O0" | |
80 | FFLAGS="${FFLAGS} -g -O0" | |
81 | FCFLAGS="${FCFLAGS} -g -O0" | |
82 | OBJCFLAGS="${OBJCFLAGS} -g -O0" | |
83 | ], | |
84 | [info],[ | |
85 | AC_MSG_RESULT(info) | |
86 | CFLAGS="${CFLAGS} -g" | |
87 | CXXFLAGS="${CXXFLAGS} -g" | |
88 | FFLAGS="${FFLAGS} -g" | |
89 | FCFLAGS="${FCFLAGS} -g" | |
90 | OBJCFLAGS="${OBJCFLAGS} -g" | |
91 | ], | |
92 | [profile],[ | |
93 | AC_MSG_RESULT(profile) | |
94 | CFLAGS="${CFLAGS} -g -pg" | |
95 | CXXFLAGS="${CXXFLAGS} -g -pg" | |
96 | FFLAGS="${FFLAGS} -g -pg" | |
97 | FCFLAGS="${FCFLAGS} -g -pg" | |
98 | OBJCFLAGS="${OBJCFLAGS} -g -pg" | |
99 | LDFLAGS="${LDFLAGS} -pg" | |
100 | ], | |
101 | [ | |
102 | AC_MSG_RESULT(no) | |
103 | dnl Ensure AC_PROG_CC/CXX/F77/FC/OBJC will not enable debug flags | |
104 | dnl by setting any unset environment flag variables | |
105 | AS_IF([test "x${CFLAGS+set}" != "xset"], | |
106 | [CFLAGS=""]) | |
107 | AS_IF([test "x${CXXFLAGS+set}" != "xset"], | |
108 | [CXXFLAGS=""]) | |
109 | AS_IF([test "x${FFLAGS+set}" != "xset"], | |
110 | [FFLAGS=""]) | |
111 | AS_IF([test "x${FCFLAGS+set}" != "xset"], | |
112 | [FCFLAGS=""]) | |
113 | AS_IF([test "x${OBJCFLAGS+set}" != "xset"], | |
114 | [OBJCFLAGS=""]) | |
115 | ]) | |
116 | ||
117 | dnl Define various variables if debugging is disabled. | |
118 | dnl assert.h is a NOP if NDEBUG is defined, so define it by default. | |
119 | AS_IF([test "x$enable_debug" = "xyes"], | |
120 | [m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is enabled])])], | |
121 | [m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is disabled])])]) | |
122 | ax_enable_debug=$enable_debug | |
123 | ]) |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CHECK_GNU_MAKE() | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # This macro searches for a GNU version of make. If a match is found: | |
11 | # | |
12 | # * The makefile variable `ifGNUmake' is set to the empty string, otherwise | |
13 | # it is set to "#". This is useful for including a special features in a | |
14 | # Makefile, which cannot be handled by other versions of make. | |
15 | # * The variable `_cv_gnu_make_command` is set to the command to invoke | |
16 | # GNU make if it exists, the empty string otherwise. | |
17 | # * The variable `ax_cv_gnu_make_command` is set to the command to invoke | |
18 | # GNU make by copying `_cv_gnu_make_command`, otherwise it is unset. | |
19 | # * If GNU Make is found, its version is extracted from the output of | |
20 | # `make --version` as the last field of a record of space-separated | |
21 | # columns and saved into the variable `ax_check_gnu_make_version`. | |
22 | # | |
23 | # Here is an example of its use: | |
24 | # | |
25 | # Makefile.in might contain: | |
26 | # | |
27 | # # A failsafe way of putting a dependency rule into a makefile | |
28 | # $(DEPEND): | |
29 | # $(CC) -MM $(srcdir)/*.c > $(DEPEND) | |
30 | # | |
31 | # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND))) | |
32 | # @ifGNUmake@ include $(DEPEND) | |
33 | # @ifGNUmake@ endif | |
34 | # | |
35 | # Then configure.in would normally contain: | |
36 | # | |
37 | # AX_CHECK_GNU_MAKE() | |
38 | # AC_OUTPUT(Makefile) | |
39 | # | |
40 | # Then perhaps to cause gnu make to override any other make, we could do | |
41 | # something like this (note that GNU make always looks for GNUmakefile | |
42 | # first): | |
43 | # | |
44 | # if ! test x$_cv_gnu_make_command = x ; then | |
45 | # mv Makefile GNUmakefile | |
46 | # echo .DEFAULT: > Makefile ; | |
47 | # echo \ $_cv_gnu_make_command \$@ >> Makefile; | |
48 | # fi | |
49 | # | |
50 | # Then, if any (well almost any) other make is called, and GNU make also | |
51 | # exists, then the other make wraps the GNU make. | |
52 | # | |
53 | # LICENSE | |
54 | # | |
55 | # Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au> | |
56 | # Copyright (c) 2015 Enrico M. Crisostomo <enrico.m.crisostomo@gmail.com> | |
57 | # | |
58 | # Copying and distribution of this file, with or without modification, are | |
59 | # permitted in any medium without royalty provided the copyright notice | |
60 | # and this notice are preserved. This file is offered as-is, without any | |
61 | # warranty. | |
62 | ||
63 | #serial 8 | |
64 | ||
65 | AC_DEFUN([AX_CHECK_GNU_MAKE],dnl | |
66 | [AC_PROG_AWK | |
67 | AC_CACHE_CHECK([for GNU make],[_cv_gnu_make_command],[dnl | |
68 | _cv_gnu_make_command="" ; | |
69 | dnl Search all the common names for GNU make | |
70 | for a in "$MAKE" make gmake gnumake ; do | |
71 | if test -z "$a" ; then continue ; fi ; | |
72 | if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then | |
73 | _cv_gnu_make_command=$a ; | |
74 | AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make") | |
75 | ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }') | |
76 | break ; | |
77 | fi | |
78 | done ;]) | |
79 | dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise | |
80 | AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])]) | |
81 | AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])]) | |
82 | AC_SUBST([ifGNUmake]) | |
83 | ]) |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # Check whether the given FLAG works with the linker or gives an error. | |
11 | # (Warnings, however, are ignored) | |
12 | # | |
13 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | |
14 | # success/failure. | |
15 | # | |
16 | # If EXTRA-FLAGS is defined, it is added to the linker's default flags | |
17 | # when the check is done. The check is thus made with the flags: "LDFLAGS | |
18 | # EXTRA-FLAGS FLAG". This can for example be used to force the linker to | |
19 | # issue an error when a bad flag is given. | |
20 | # | |
21 | # INPUT gives an alternative input source to AC_LINK_IFELSE. | |
22 | # | |
23 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | |
24 | # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. | |
25 | # | |
26 | # LICENSE | |
27 | # | |
28 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | |
29 | # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | |
30 | # | |
31 | # This program is free software: you can redistribute it and/or modify it | |
32 | # under the terms of the GNU General Public License as published by the | |
33 | # Free Software Foundation, either version 3 of the License, or (at your | |
34 | # option) any later version. | |
35 | # | |
36 | # This program is distributed in the hope that it will be useful, but | |
37 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
38 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
39 | # Public License for more details. | |
40 | # | |
41 | # You should have received a copy of the GNU General Public License along | |
42 | # with this program. If not, see <http://www.gnu.org/licenses/>. | |
43 | # | |
44 | # As a special exception, the respective Autoconf Macro's copyright owner | |
45 | # gives unlimited permission to copy, distribute and modify the configure | |
46 | # scripts that are the output of Autoconf when processing the Macro. You | |
47 | # need not follow the terms of the GNU General Public License when using | |
48 | # or distributing such scripts, even though portions of the text of the | |
49 | # Macro appear in them. The GNU General Public License (GPL) does govern | |
50 | # all other use of the material that constitutes the Autoconf Macro. | |
51 | # | |
52 | # This special exception to the GPL applies to versions of the Autoconf | |
53 | # Macro released by the Autoconf Archive. When you make and distribute a | |
54 | # modified version of the Autoconf Macro, you may extend this special | |
55 | # exception to the GPL to apply to your modified version as well. | |
56 | ||
57 | #serial 4 | |
58 | ||
59 | AC_DEFUN([AX_CHECK_LINK_FLAG], | |
60 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF | |
61 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl | |
62 | AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ | |
63 | ax_check_save_flags=$LDFLAGS | |
64 | LDFLAGS="$LDFLAGS $4 $1" | |
65 | AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], | |
66 | [AS_VAR_SET(CACHEVAR,[yes])], | |
67 | [AS_VAR_SET(CACHEVAR,[no])]) | |
68 | LDFLAGS=$ax_check_save_flags]) | |
69 | AS_VAR_IF(CACHEVAR,yes, | |
70 | [m4_default([$2], :)], | |
71 | [m4_default([$3], :)]) | |
72 | AS_VAR_POPDEF([CACHEVAR])dnl | |
73 | ])dnl AX_CHECK_LINK_FLAGS |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CODE_COVERAGE() | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, | |
11 | # CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LDFLAGS which should be | |
12 | # included in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LDFLAGS variables of | |
13 | # every build target (program or library) which should be built with code | |
14 | # coverage support. Also defines CODE_COVERAGE_RULES which should be | |
15 | # substituted in your Makefile; and $enable_code_coverage which can be | |
16 | # used in subsequent configure output. CODE_COVERAGE_ENABLED is defined | |
17 | # and substituted, and corresponds to the value of the | |
18 | # --enable-code-coverage option, which defaults to being disabled. | |
19 | # | |
20 | # Test also for gcov program and create GCOV variable that could be | |
21 | # substituted. | |
22 | # | |
23 | # Note that all optimisation flags in CFLAGS must be disabled when code | |
24 | # coverage is enabled. | |
25 | # | |
26 | # Usage example: | |
27 | # | |
28 | # configure.ac: | |
29 | # | |
30 | # AX_CODE_COVERAGE | |
31 | # | |
32 | # Makefile.am: | |
33 | # | |
34 | # @CODE_COVERAGE_RULES@ | |
35 | # my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ... | |
36 | # my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... | |
37 | # my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... | |
38 | # my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... | |
39 | # | |
40 | # This results in a "check-code-coverage" rule being added to any | |
41 | # Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module | |
42 | # has been configured with --enable-code-coverage). Running `make | |
43 | # check-code-coverage` in that directory will run the module's test suite | |
44 | # (`make check`) and build a code coverage report detailing the code which | |
45 | # was touched, then print the URI for the report. | |
46 | # | |
47 | # This code was derived from Makefile.decl in GLib, originally licenced | |
48 | # under LGPLv2.1+. | |
49 | # | |
50 | # LICENSE | |
51 | # | |
52 | # Copyright (c) 2012, 2016 Philip Withnall | |
53 | # Copyright (c) 2012 Xan Lopez | |
54 | # Copyright (c) 2012 Christian Persch | |
55 | # Copyright (c) 2012 Paolo Borelli | |
56 | # Copyright (c) 2012 Dan Winship | |
57 | # Copyright (c) 2015 Bastien ROUCARIES | |
58 | # | |
59 | # This library is free software; you can redistribute it and/or modify it | |
60 | # under the terms of the GNU Lesser General Public License as published by | |
61 | # the Free Software Foundation; either version 2.1 of the License, or (at | |
62 | # your option) any later version. | |
63 | # | |
64 | # This library is distributed in the hope that it will be useful, but | |
65 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
66 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | |
67 | # General Public License for more details. | |
68 | # | |
69 | # You should have received a copy of the GNU Lesser General Public License | |
70 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
71 | ||
72 | #serial 15 | |
73 | ||
74 | AC_DEFUN([AX_CODE_COVERAGE],[ | |
75 | dnl Check for --enable-code-coverage | |
76 | AC_REQUIRE([AC_PROG_SED]) | |
77 | ||
78 | # allow to override gcov location | |
79 | AC_ARG_WITH([gcov], | |
80 | [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], | |
81 | [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], | |
82 | [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) | |
83 | ||
84 | AC_MSG_CHECKING([whether to build with code coverage support]) | |
85 | AC_ARG_ENABLE([code-coverage], | |
86 | AS_HELP_STRING([--enable-code-coverage], | |
87 | [Whether to enable code coverage support]),, | |
88 | enable_code_coverage=no) | |
89 | ||
90 | AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) | |
91 | AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) | |
92 | AC_MSG_RESULT($enable_code_coverage) | |
93 | ||
94 | AS_IF([ test "$enable_code_coverage" = "yes" ], [ | |
95 | # check for gcov | |
96 | AC_CHECK_TOOL([GCOV], | |
97 | [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], | |
98 | [:]) | |
99 | AS_IF([test "X$GCOV" = "X:"], | |
100 | [AC_MSG_ERROR([gcov is needed to do coverage])]) | |
101 | AC_SUBST([GCOV]) | |
102 | ||
103 | dnl Check if gcc is being used | |
104 | AS_IF([ test "$GCC" = "no" ], [ | |
105 | AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) | |
106 | ]) | |
107 | ||
108 | # List of supported lcov versions. | |
109 | lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" | |
110 | ||
111 | AC_CHECK_PROG([LCOV], [lcov], [lcov]) | |
112 | AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) | |
113 | ||
114 | AS_IF([ test "$LCOV" ], [ | |
115 | AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [ | |
116 | ax_cv_lcov_version=invalid | |
117 | lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` | |
118 | for lcov_check_version in $lcov_version_list; do | |
119 | if test "$lcov_version" = "$lcov_check_version"; then | |
120 | ax_cv_lcov_version="$lcov_check_version (ok)" | |
121 | fi | |
122 | done | |
123 | ]) | |
124 | ], [ | |
125 | lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" | |
126 | AC_MSG_ERROR([$lcov_msg]) | |
127 | ]) | |
128 | ||
129 | case $ax_cv_lcov_version in | |
130 | ""|invalid[)] | |
131 | lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." | |
132 | AC_MSG_ERROR([$lcov_msg]) | |
133 | LCOV="exit 0;" | |
134 | ;; | |
135 | esac | |
136 | ||
137 | AS_IF([ test -z "$GENHTML" ], [ | |
138 | AC_MSG_ERROR([Could not find genhtml from the lcov package]) | |
139 | ]) | |
140 | ||
141 | dnl Build the code coverage flags | |
142 | CODE_COVERAGE_CPPFLAGS="-DNDEBUG" | |
143 | CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" | |
144 | CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" | |
145 | CODE_COVERAGE_LDFLAGS="-lgcov" | |
146 | ||
147 | AC_SUBST([CODE_COVERAGE_CPPFLAGS]) | |
148 | AC_SUBST([CODE_COVERAGE_CFLAGS]) | |
149 | AC_SUBST([CODE_COVERAGE_CXXFLAGS]) | |
150 | AC_SUBST([CODE_COVERAGE_LDFLAGS]) | |
151 | ]) | |
152 | ||
153 | [CODE_COVERAGE_RULES=' | |
154 | # Code coverage | |
155 | # | |
156 | # Optional: | |
157 | # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. | |
158 | # Multiple directories may be specified, separated by whitespace. | |
159 | # (Default: $(top_builddir)) | |
160 | # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated | |
161 | # by lcov for code coverage. (Default: | |
162 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) | |
163 | # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage | |
164 | # reports to be created. (Default: | |
165 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) | |
166 | # - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, | |
167 | # set to 0 to disable it and leave empty to stay with the default. | |
168 | # (Default: empty) | |
169 | # - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov | |
170 | # instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) | |
171 | # - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov | |
172 | # instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) | |
173 | # - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov | |
174 | # - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the | |
175 | # collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) | |
176 | # - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov | |
177 | # instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) | |
178 | # - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering | |
179 | # lcov instance. (Default: empty) | |
180 | # - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov | |
181 | # instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) | |
182 | # - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the | |
183 | # genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) | |
184 | # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml | |
185 | # instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) | |
186 | # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore | |
187 | # | |
188 | # The generated report will be titled using the $(PACKAGE_NAME) and | |
189 | # $(PACKAGE_VERSION). In order to add the current git hash to the title, | |
190 | # use the git-version-gen script, available online. | |
191 | ||
192 | # Optional variables | |
193 | CODE_COVERAGE_DIRECTORY ?= $(top_builddir) | |
194 | CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info | |
195 | CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage | |
196 | CODE_COVERAGE_BRANCH_COVERAGE ?= | |
197 | CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ | |
198 | --rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) | |
199 | CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) | |
200 | CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" | |
201 | CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) | |
202 | CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) | |
203 | CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= | |
204 | CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) | |
205 | CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ | |
206 | $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ | |
207 | --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) | |
208 | CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) | |
209 | CODE_COVERAGE_IGNORE_PATTERN ?= | |
210 | ||
211 | code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) | |
212 | code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) | |
213 | code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ | |
214 | $(CODE_COVERAGE_OUTPUT_FILE); | |
215 | code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) | |
216 | code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) | |
217 | code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ | |
218 | $(CODE_COVERAGE_IGNORE_PATTERN); | |
219 | code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) | |
220 | code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) | |
221 | code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); | |
222 | code_coverage_quiet = $(code_coverage_quiet_$(V)) | |
223 | code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) | |
224 | code_coverage_quiet_0 = --quiet | |
225 | ||
226 | # sanitizes the test-name: replaces with underscores: dashes and dots | |
227 | code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) | |
228 | ||
229 | # Use recursive makes in order to ignore errors during check | |
230 | check-code-coverage: | |
231 | ifeq ($(CODE_COVERAGE_ENABLED),yes) | |
232 | -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check | |
233 | $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture | |
234 | else | |
235 | @echo "Need to reconfigure with --enable-code-coverage" | |
236 | endif | |
237 | ||
238 | # Capture code coverage data | |
239 | code-coverage-capture: code-coverage-capture-hook | |
240 | ifeq ($(CODE_COVERAGE_ENABLED),yes) | |
241 | $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) | |
242 | $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) | |
243 | -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp | |
244 | $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) | |
245 | @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" | |
246 | else | |
247 | @echo "Need to reconfigure with --enable-code-coverage" | |
248 | endif | |
249 | ||
250 | # Hook rule executed before code-coverage-capture, overridable by the user | |
251 | code-coverage-capture-hook: | |
252 | ||
253 | ifeq ($(CODE_COVERAGE_ENABLED),yes) | |
254 | clean: code-coverage-clean | |
255 | code-coverage-clean: | |
256 | -$(LCOV) --directory $(top_builddir) -z | |
257 | -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) | |
258 | -find . -name "*.gcda" -o -name "*.gcov" -delete | |
259 | endif | |
260 | ||
261 | GITIGNOREFILES ?= | |
262 | GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) | |
263 | ||
264 | A''M_DISTCHECK_CONFIGURE_FLAGS ?= | |
265 | A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage | |
266 | ||
267 | .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean | |
268 | '] | |
269 | ||
270 | AC_SUBST([CODE_COVERAGE_RULES]) | |
271 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) | |
272 | ]) |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_configure_args.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_CONFIGURE_ARGS | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # Helper macro for AX_ENABLE_BUILDDIR. | |
11 | # | |
12 | # The traditional way of starting a subdir-configure is running the script | |
13 | # with ${1+"$@"} but since autoconf 2.60 this is broken. Instead we have | |
14 | # to rely on eval'ing $ac_configure_args however some old autoconf | |
15 | # versions do not provide that. To ensure maximum portability of autoconf | |
16 | # extension macros this helper can be AC_REQUIRE'd so that | |
17 | # $ac_configure_args will alsways be present. | |
18 | # | |
19 | # Sadly, the traditional "exec $SHELL" of the enable_builddir macros is | |
20 | # spoiled now and must be replaced by "eval + exit $?". | |
21 | # | |
22 | # Example: | |
23 | # | |
24 | # AC_DEFUN([AX_ENABLE_SUBDIR],[dnl | |
25 | # AC_REQUIRE([AX_CONFIGURE_ARGS])dnl | |
26 | # eval $SHELL $ac_configure_args || exit $? | |
27 | # ...]) | |
28 | # | |
29 | # LICENSE | |
30 | # | |
31 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | |
32 | # | |
33 | # This program is free software; you can redistribute it and/or modify it | |
34 | # under the terms of the GNU General Public License as published by the | |
35 | # Free Software Foundation; either version 3 of the License, or (at your | |
36 | # option) any later version. | |
37 | # | |
38 | # This program is distributed in the hope that it will be useful, but | |
39 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
40 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
41 | # Public License for more details. | |
42 | # | |
43 | # You should have received a copy of the GNU General Public License along | |
44 | # with this program. If not, see <http://www.gnu.org/licenses/>. | |
45 | # | |
46 | # As a special exception, the respective Autoconf Macro's copyright owner | |
47 | # gives unlimited permission to copy, distribute and modify the configure | |
48 | # scripts that are the output of Autoconf when processing the Macro. You | |
49 | # need not follow the terms of the GNU General Public License when using | |
50 | # or distributing such scripts, even though portions of the text of the | |
51 | # Macro appear in them. The GNU General Public License (GPL) does govern | |
52 | # all other use of the material that constitutes the Autoconf Macro. | |
53 | # | |
54 | # This special exception to the GPL applies to versions of the Autoconf | |
55 | # Macro released by the Autoconf Archive. When you make and distribute a | |
56 | # modified version of the Autoconf Macro, you may extend this special | |
57 | # exception to the GPL to apply to your modified version as well. | |
58 | ||
59 | #serial 9 | |
60 | ||
61 | AC_DEFUN([AX_CONFIGURE_ARGS],[ | |
62 | # [$]@ is unsable in 2.60+ but earlier autoconf had no ac_configure_args | |
63 | if test "${ac_configure_args+set}" != "set" ; then | |
64 | ac_configure_args= | |
65 | for ac_arg in ${1+"[$]@"}; do | |
66 | ac_configure_args="$ac_configure_args '$ac_arg'" | |
67 | done | |
68 | fi | |
69 | ]) |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_enable_builddir.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_ENABLE_BUILDDIR [(dirstring-or-command [,Makefile.mk [,-all]])] | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # If the current configure was run within the srcdir then we move all | |
11 | # configure-files into a subdir and let the configure steps continue | |
12 | # there. We provide an option --disable-builddir to suppress the move into | |
13 | # a separate builddir. | |
14 | # | |
15 | # Defaults: | |
16 | # | |
17 | # $1 = $host (overridden with $HOST) | |
18 | # $2 = Makefile.mk | |
19 | # $3 = -all | |
20 | # | |
21 | # This macro must be called before AM_INIT_AUTOMAKE. It creates a default | |
22 | # toplevel srcdir Makefile from the information found in the created | |
23 | # toplevel builddir Makefile. It just copies the variables and | |
24 | # rule-targets, each extended with a default rule-execution that recurses | |
25 | # into the build directory of the current "HOST". You can override the | |
26 | # auto-dection through `config.guess` and build-time of course, as in | |
27 | # | |
28 | # make HOST=i386-mingw-cross | |
29 | # | |
30 | # which can of course set at configure time as well using | |
31 | # | |
32 | # configure --host=i386-mingw-cross | |
33 | # | |
34 | # After the default has been created, additional rules can be appended | |
35 | # that will not just recurse into the subdirectories and only ever exist | |
36 | # in the srcdir toplevel makefile - these parts are read from the $2 = | |
37 | # Makefile.mk file | |
38 | # | |
39 | # The automatic rules are usually scanning the toplevel Makefile for lines | |
40 | # like '#### $host |$builddir' to recognize the place where to recurse | |
41 | # into. Usually, the last one is the only one used. However, almost all | |
42 | # targets have an additional "*-all" rule which makes the script to | |
43 | # recurse into _all_ variants of the current HOST (!!) setting. The "-all" | |
44 | # suffix can be overriden for the macro as well. | |
45 | # | |
46 | # a special rule is only given for things like "dist" that will copy the | |
47 | # tarball from the builddir to the sourcedir (or $(PUB)) for reason of | |
48 | # convenience. | |
49 | # | |
50 | # LICENSE | |
51 | # | |
52 | # Copyright (c) 2009 Guido U. Draheim <guidod@gmx.de> | |
53 | # Copyright (c) 2009 Alan Jenkins <alan-jenkins@tuffmail.co.uk> | |
54 | # | |
55 | # This program is free software; you can redistribute it and/or modify it | |
56 | # under the terms of the GNU General Public License as published by the | |
57 | # Free Software Foundation; either version 3 of the License, or (at your | |
58 | # option) any later version. | |
59 | # | |
60 | # This program is distributed in the hope that it will be useful, but | |
61 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
62 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
63 | # Public License for more details. | |
64 | # | |
65 | # You should have received a copy of the GNU General Public License along | |
66 | # with this program. If not, see <http://www.gnu.org/licenses/>. | |
67 | # | |
68 | # As a special exception, the respective Autoconf Macro's copyright owner | |
69 | # gives unlimited permission to copy, distribute and modify the configure | |
70 | # scripts that are the output of Autoconf when processing the Macro. You | |
71 | # need not follow the terms of the GNU General Public License when using | |
72 | # or distributing such scripts, even though portions of the text of the | |
73 | # Macro appear in them. The GNU General Public License (GPL) does govern | |
74 | # all other use of the material that constitutes the Autoconf Macro. | |
75 | # | |
76 | # This special exception to the GPL applies to versions of the Autoconf | |
77 | # Macro released by the Autoconf Archive. When you make and distribute a | |
78 | # modified version of the Autoconf Macro, you may extend this special | |
79 | # exception to the GPL to apply to your modified version as well. | |
80 | ||
81 | #serial 25 | |
82 | ||
83 | AC_DEFUN([AX_ENABLE_BUILDDIR],[ | |
84 | AC_REQUIRE([AC_CANONICAL_HOST])[]dnl | |
85 | AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl | |
86 | AC_REQUIRE([AX_CONFIGURE_ARGS])[]dnl | |
87 | AC_REQUIRE([AM_AUX_DIR_EXPAND])[]dnl | |
88 | AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl | |
89 | AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl | |
90 | AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl | |
91 | AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl | |
92 | SUB="." | |
93 | AC_ARG_ENABLE([builddir], AS_HELP_STRING( | |
94 | [--disable-builddir],[disable automatic build in subdir of sources]) | |
95 | ,[SUB="$enableval"], [SUB="auto"]) | |
96 | if test ".$ac_srcdir_defaulted" != ".no" ; then | |
97 | if test ".$srcdir" = ".." ; then | |
98 | if test -f config.status ; then | |
99 | AC_MSG_NOTICE(toplevel srcdir already configured... skipping subdir build) | |
100 | else | |
101 | test ".$SUB" = "." && SUB="." | |
102 | test ".$SUB" = ".no" && SUB="." | |
103 | test ".$TARGET" = "." && TARGET="$target" | |
104 | test ".$SUB" = ".auto" && SUB="m4_ifval([$1], [$1],[$TARGET])" | |
105 | if test ".$SUB" != ".." ; then # we know where to go and | |
106 | AS_MKDIR_P([$SUB]) | |
107 | echo __.$SUB.__ > $SUB/conftest.tmp | |
108 | cd $SUB | |
109 | if grep __.$SUB.__ conftest.tmp >/dev/null 2>/dev/null ; then | |
110 | rm conftest.tmp | |
111 | AC_MSG_RESULT([continue configure in default builddir "./$SUB"]) | |
112 | else | |
113 | AC_MSG_ERROR([could not change to default builddir "./$SUB"]) | |
114 | fi | |
115 | srcdir=`echo "$SUB" | | |
116 | sed -e 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,[[/]]$,,;'` | |
117 | # going to restart from subdirectory location | |
118 | test -f $srcdir/config.log && mv $srcdir/config.log . | |
119 | test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h . | |
120 | test -f $srcdir/conftest.log && mv $srcdir/conftest.log . | |
121 | test -f $srcdir/$cache_file && mv $srcdir/$cache_file . | |
122 | AC_MSG_RESULT(....exec $SHELL $srcdir/[$]0 "--srcdir=$srcdir" "--enable-builddir=$SUB" ${1+"[$]@"}) | |
123 | case "[$]0" in # restart | |
124 | [[\\/]]* | ?:[[\\/]]*) # Asbolute name | |
125 | eval $SHELL "'[$]0'" "'--srcdir=$srcdir'" "'--enable-builddir=$SUB'" $ac_configure_args ;; | |
126 | *) eval $SHELL "'$srcdir/[$]0'" "'--srcdir=$srcdir'" "'--enable-builddir=$SUB'" $ac_configure_args ;; | |
127 | esac ; exit $? | |
128 | fi | |
129 | fi | |
130 | fi fi | |
131 | test ".$SUB" = ".auto" && SUB="." | |
132 | dnl ac_path_prog uses "set dummy" to override $@ which would defeat the "exec" | |
133 | AC_PATH_PROG(SED,gsed sed, sed) | |
134 | AUX="$am_aux_dir" | |
135 | AS_VAR_POPDEF([SED])dnl | |
136 | AS_VAR_POPDEF([AUX])dnl | |
137 | AS_VAR_POPDEF([SUB])dnl | |
138 | AC_CONFIG_COMMANDS([buildir],[dnl .............. config.status .............. | |
139 | AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl | |
140 | AS_VAR_PUSHDEF([TOP],[top_srcdir])dnl | |
141 | AS_VAR_PUSHDEF([SRC],[ac_top_srcdir])dnl | |
142 | AS_VAR_PUSHDEF([AUX],[ax_enable_builddir_auxdir])dnl | |
143 | AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl | |
144 | pushdef([END],[Makefile.mk])dnl | |
145 | pushdef([_ALL],[ifelse([$3],,[-all],[$3])])dnl | |
146 | SRC="$ax_enable_builddir_srcdir" | |
147 | if test ".$SUB" = ".." ; then | |
148 | if test -f "$TOP/Makefile" ; then | |
149 | AC_MSG_NOTICE([skipping TOP/Makefile - left untouched]) | |
150 | else | |
151 | AC_MSG_NOTICE([skipping TOP/Makefile - not created]) | |
152 | fi | |
153 | else | |
154 | if test -f "$SRC/Makefile" ; then | |
155 | a=`grep "^VERSION " "$SRC/Makefile"` ; b=`grep "^VERSION " Makefile` | |
156 | test "$a" != "$b" && rm "$SRC/Makefile" | |
157 | fi | |
158 | if test -f "$SRC/Makefile" ; then | |
159 | echo "$SRC/Makefile : $SRC/Makefile.in" > $tmp/conftemp.mk | |
160 | echo " []@ echo 'REMOVED,,,' >\$[]@" >> $tmp/conftemp.mk | |
161 | eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null" | |
162 | if grep '^REMOVED,,,' "$SRC/Makefile" >/dev/null | |
163 | then rm $SRC/Makefile ; fi | |
164 | cp $tmp/conftemp.mk $SRC/makefiles.mk~ ## DEBUGGING | |
165 | fi | |
166 | if test ! -f "$SRC/Makefile" ; then | |
167 | AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile]) | |
168 | x='`' ; cat >$tmp/conftemp.sed <<_EOF | |
169 | /^\$/n | |
170 | x | |
171 | /^\$/bS | |
172 | x | |
173 | /\\\\\$/{H;d;} | |
174 | {H;s/.*//;x;} | |
175 | bM | |
176 | :S | |
177 | x | |
178 | /\\\\\$/{h;d;} | |
179 | {h;s/.*//;x;} | |
180 | :M | |
181 | s/\\(\\n\\) /\\1 /g | |
182 | /^ /d | |
183 | /^[[ ]]*[[\\#]]/d | |
184 | /^VPATH *=/d | |
185 | s/^srcdir *=.*/srcdir = ./ | |
186 | s/^top_srcdir *=.*/top_srcdir = ./ | |
187 | /[[:=]]/!d | |
188 | /^\\./d | |
189 | dnl Now handle rules (i.e. lines containing ":" but not " = "). | |
190 | / = /b | |
191 | / .= /b | |
192 | /:/!b | |
193 | s/:.*/:/ | |
194 | s/ / /g | |
195 | s/ \\([[a-z]][[a-z-]]*[[a-zA-Z0-9]]\\)\\([[ :]]\\)/ \\1 \\1[]_ALL\\2/g | |
196 | s/^\\([[a-z]][[a-z-]]*[[a-zA-Z0-9]]\\)\\([[ :]]\\)/\\1 \\1[]_ALL\\2/ | |
197 | s/ / /g | |
198 | /^all all[]_ALL[[ :]]/i\\ | |
199 | all-configured : all[]_ALL | |
200 | dnl dist-all exists... and would make for dist-all-all | |
201 | s/ [[a-zA-Z0-9-]]*[]_ALL [[a-zA-Z0-9-]]*[]_ALL[]_ALL//g | |
202 | /[]_ALL[]_ALL/d | |
203 | a\\ | |
204 | @ HOST="\$(HOST)\" \\\\\\ | |
205 | ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\ | |
206 | ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\ | |
207 | ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
208 | ; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" -eq "0" ; then : \\\\\\ | |
209 | ; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\ | |
210 | ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\ | |
211 | ; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\ | |
212 | ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
213 | ; (cd "\$\$i" && test ! -f configure && \$(MAKE) \$\$use) || exit; done | |
214 | dnl special rule add-on: "dist" copies the tarball to $(PUB). (source tree) | |
215 | /dist[]_ALL *:/a\\ | |
216 | @ HOST="\$(HOST)\" \\\\\\ | |
217 | ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\ | |
218 | ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\ | |
219 | ; found=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
220 | ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\ | |
221 | ; if test "\$\$found" -eq "0" ; then : \\\\\\ | |
222 | ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\ | |
223 | ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
224 | ; for f in \$\$i/\$(PACKAGE)-\$(VERSION).tar.* \\\\\\ | |
225 | ; do test -f "\$\$f" && mv "\$\$f" \$(PUB). ; done ; break ; done | |
226 | dnl special rule add-on: "dist-foo" copies all the archives to $(PUB). (source tree) | |
227 | /dist-[[a-zA-Z0-9]]*[]_ALL *:/a\\ | |
228 | @ HOST="\$(HOST)\" \\\\\\ | |
229 | ; test ".\$\$HOST" = "." && HOST=$x sh ./config.guess $x \\\\\\ | |
230 | ; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\ | |
231 | ; found=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
232 | ; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).*" \\\\\\ | |
233 | ; if test "\$\$found" -eq "0" ; then : \\\\\\ | |
234 | ; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\ | |
235 | ; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
236 | ; for f in \$\$i/\$(PACKAGE)-\$(VERSION).* \\\\\\ | |
237 | ; do test -f "\$\$f" && mv "\$\$f" \$(PUB). ; done ; break ; done | |
238 | dnl special rule add-on: "distclean" removes all local builddirs completely | |
239 | /distclean[]_ALL *:/a\\ | |
240 | @ HOST="\$(HOST)\" \\\\\\ | |
241 | ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\ | |
242 | ; BUILD=$x grep "^#### .*|" Makefile | sed -e 's/.*|//' $x \\\\\\ | |
243 | ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\ | |
244 | ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\ | |
245 | ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\ | |
246 | ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
247 | ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\ | |
248 | ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ | |
249 | ; echo "\$\$i" | grep "^/" > /dev/null && continue \\\\\\ | |
250 | ; echo "\$\$i" | grep "^../" > /dev/null && continue \\\\\\ | |
251 | ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile | |
252 | _EOF | |
253 | cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING | |
254 | $SED -f $tmp/conftemp.sed Makefile >$SRC/Makefile | |
255 | if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then | |
256 | AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])]) | |
257 | cat $SRC/END >>$SRC/Makefile | |
258 | fi ; xxxx="####" | |
259 | echo "$xxxx CONFIGURATIONS FOR TOPLEVEL MAKEFILE: " >>$SRC/Makefile | |
260 | # sanity check | |
261 | if grep '^; echo "MAKE ' $SRC/Makefile >/dev/null ; then | |
262 | AC_MSG_NOTICE([buggy sed found - it deletes tab in "a" text parts]) | |
263 | $SED -e '/^@ HOST=/s/^/ /' -e '/^; /s/^/ /' $SRC/Makefile \ | |
264 | >$SRC/Makefile~ | |
265 | (test -s $SRC/Makefile~ && mv $SRC/Makefile~ $SRC/Makefile) 2>/dev/null | |
266 | fi | |
267 | else | |
268 | xxxx="\\#\\#\\#\\#" | |
269 | # echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed | |
270 | echo "s!^$xxxx [[^|]]* | *$SUB *\$!$xxxx ...... $SUB!" >$tmp/conftemp.sed | |
271 | $SED -f "$tmp/conftemp.sed" "$SRC/Makefile" >$tmp/mkfile.tmp | |
272 | cp "$tmp/conftemp.sed" "$SRC/makefiles.sed~" ## DEBUGGING | |
273 | cp "$tmp/mkfile.tmp" "$SRC/makefiles.out~" ## DEBUGGING | |
274 | if cmp -s "$SRC/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then | |
275 | AC_MSG_NOTICE([keeping TOP/Makefile from earlier configure]) | |
276 | rm "$tmp/mkfile.tmp" | |
277 | else | |
278 | AC_MSG_NOTICE([reusing TOP/Makefile from earlier configure]) | |
279 | mv "$tmp/mkfile.tmp" "$SRC/Makefile" | |
280 | fi | |
281 | fi | |
282 | AC_MSG_NOTICE([build in $SUB (HOST=$ax_enable_builddir_host)]) | |
283 | xxxx="####" | |
284 | echo "$xxxx" "$ax_enable_builddir_host" "|$SUB" >>$SRC/Makefile | |
285 | fi | |
286 | popdef([END])dnl | |
287 | AS_VAR_POPDEF([SED])dnl | |
288 | AS_VAR_POPDEF([AUX])dnl | |
289 | AS_VAR_POPDEF([SRC])dnl | |
290 | AS_VAR_POPDEF([TOP])dnl | |
291 | AS_VAR_POPDEF([SUB])dnl | |
292 | ],[dnl | |
293 | ax_enable_builddir_srcdir="$srcdir" # $srcdir | |
294 | ax_enable_builddir_host="$HOST" # $HOST / $host | |
295 | ax_enable_builddir_version="$VERSION" # $VERSION | |
296 | ax_enable_builddir_package="$PACKAGE" # $PACKAGE | |
297 | ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX | |
298 | ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED | |
299 | ax_enable_builddir="$ax_enable_builddir" # $SUB | |
300 | ])dnl | |
301 | ]) |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_extend_srcdir.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_EXTEND_SRCDIR | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # The AX_EXTEND_SRCDIR macro extends $srcdir by one path component. | |
11 | # | |
12 | # As an example, when working in /home/michael/i3-4.12/build and calling | |
13 | # ../configure, your $srcdir is "..". After calling AX_EXTEND_SRCDIR, | |
14 | # $srcdir will be set to "../../i3-4.12". | |
15 | # | |
16 | # The result of extending $srcdir is that filenames (e.g. in the output of | |
17 | # the "backtrace" gdb command) will include one more path component of the | |
18 | # absolute source path. The additional path component makes it easy for | |
19 | # users to recognize which files belong to the PACKAGE, and -- provided a | |
20 | # dist tarball was unpacked -- which version of PACKAGE was used. | |
21 | # | |
22 | # As an example, in "backtrace", you will see: | |
23 | # | |
24 | # #0 main (argc=1, argv=0x7fffffff1fc8) at ../../i3-4.12/src/main.c:187 | |
25 | # | |
26 | # instead of: | |
27 | # | |
28 | # #0 main (argc=1, argv=0x7fffffff1fc8) at ../src/main.c:187 | |
29 | # | |
30 | # In case your code uses the __FILE__ preprocessor directive to refer to | |
31 | # the filename of the current source file (e.g. in debug messages), using | |
32 | # the extended path might be undesirable. For this purpose, | |
33 | # AX_EXTEND_SRCDIR defines the output variable AX_EXTEND_SRCDIR_CPPFLAGS, | |
34 | # which can be added to AM_CPPFLAGS in Makefile.am in order to define the | |
35 | # preprocessor directive STRIPPED__FILE__. As an example, when compiling | |
36 | # the file "../../i3-4.12/src/main.c", STRIPPED__FILE__ evaluates to | |
37 | # "main.c". | |
38 | # | |
39 | # There are some caveats: When $srcdir is "." (i.e. when ./configure was | |
40 | # called instead of ../configure in a separate build directory), | |
41 | # AX_EXTEND_SRCDIR will still extend $srcdir, but the intended effect will | |
42 | # not be achieved because of the way automake specifies file paths: | |
43 | # automake defines COMPILE to use "`test -f '$source' || echo | |
44 | # '\$(srcdir)/'`$source" in order to prefer files in the current directory | |
45 | # over specifying $srcdir explicitly. | |
46 | # | |
47 | # The AX_EXTEND_SRCDIR author is not aware of any way to influence this | |
48 | # automake behavior. Patches very welcome. | |
49 | # | |
50 | # To work around this issue, you can use AX_ENABLE_BUILDDIR i.e. by adding | |
51 | # the following code to configure.ac: | |
52 | # | |
53 | # AX_ENABLE_BUILDDIR | |
54 | # dnl ... | |
55 | # AX_EXTEND_SRCDIR | |
56 | # | |
57 | # Then also add this bit to Makefile.am (if you wish to use | |
58 | # STRIPPED__FILE__ in your code): | |
59 | # | |
60 | # AM_CPPFLAGS = @AX_EXTEND_SRCDIR_CPPFLAGS@ | |
61 | # | |
62 | # LICENSE | |
63 | # | |
64 | # Copyright (c) 2016 Michael Stapelberg <michael@i3wm.org> | |
65 | # | |
66 | # Copying and distribution of this file, with or without modification, are | |
67 | # permitted in any medium without royalty provided the copyright notice | |
68 | # and this notice are preserved. This file is offered as-is, without any | |
69 | # warranty. | |
70 | ||
71 | #serial 3 | |
72 | ||
73 | AC_DEFUN([AX_EXTEND_SRCDIR], | |
74 | [dnl | |
75 | AS_CASE([$srcdir], | |
76 | [.|.*|/*], | |
77 | [ | |
78 | # pwd -P is specified in IEEE 1003.1 from 2004 | |
79 | as_dir=`cd "$srcdir" && pwd -P` | |
80 | as_base=`AS_BASENAME([$as_dir])` | |
81 | srcdir=${srcdir}/../${as_base} | |
82 | ||
83 | AC_SUBST([AX_EXTEND_SRCDIR_CPPFLAGS], ["-DSTRIPPED__FILE__=AS_ESCAPE([\"$$(basename $<)\"])"]) | |
84 | ]) | |
85 | ])dnl AX_EXTEND_SRCDIR |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_require_defined.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_REQUIRE_DEFINED(MACRO) | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have | |
11 | # been defined and thus are available for use. This avoids random issues | |
12 | # where a macro isn't expanded. Instead the configure script emits a | |
13 | # non-fatal: | |
14 | # | |
15 | # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found | |
16 | # | |
17 | # It's like AC_REQUIRE except it doesn't expand the required macro. | |
18 | # | |
19 | # Here's an example: | |
20 | # | |
21 | # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) | |
22 | # | |
23 | # LICENSE | |
24 | # | |
25 | # Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org> | |
26 | # | |
27 | # Copying and distribution of this file, with or without modification, are | |
28 | # permitted in any medium without royalty provided the copyright notice | |
29 | # and this notice are preserved. This file is offered as-is, without any | |
30 | # warranty. | |
31 | ||
32 | #serial 1 | |
33 | ||
34 | AC_DEFUN([AX_REQUIRE_DEFINED], [dnl | |
35 | m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) | |
36 | ])dnl AX_REQUIRE_DEFINED |
0 | # =========================================================================== | |
1 | # http://www.gnu.org/software/autoconf-archive/ax_sanitizers.html | |
2 | # =========================================================================== | |
3 | # | |
4 | # SYNOPSIS | |
5 | # | |
6 | # AX_SANITIZERS([SANITIZERS], [ENABLED-BY-DEFAULT], [ACTION-SUCCESS]) | |
7 | # | |
8 | # DESCRIPTION | |
9 | # | |
10 | # Offers users to enable one or more sanitizers (see | |
11 | # https://github.com/google/sanitizers) with the corresponding | |
12 | # --enable-<sanitizer>-sanitizer option. | |
13 | # | |
14 | # SANITIZERS is a whitespace-separated list of sanitizers to offer via | |
15 | # --enable-<sanitizer>-sanitizer options, e.g. "address memory" for the | |
16 | # address sanitizer and the memory sanitizer. If SANITIZERS is not specified, | |
17 | # all known sanitizers to AX_SANITIZERS will be offered, which at the time of | |
18 | # writing are "address memory undefined". | |
19 | # NOTE that SANITIZERS is expanded at autoconf time, not at configure time, | |
20 | # i.e. you cannot use shell variables in SANITIZERS. | |
21 | # | |
22 | # ENABLED-BY-DEFAULT is a whitespace-separated list of sanitizers which | |
23 | # should be enabled by default, e.g. "memory undefined". Note that not all | |
24 | # sanitizers can be combined, e.g. memory sanitizer cannot be enabled when | |
25 | # address sanitizer is already enabled. | |
26 | # Set ENABLED-BY-DEFAULT to a single whitespace in order to disable all | |
27 | # sanitizers by default. | |
28 | # ENABLED-BY-DEFAULT is expanded at configure time, so you can use shell | |
29 | # variables. | |
30 | # | |
31 | # ACTION-SUCCESS allows to specify shell commands to execute on success, i.e. | |
32 | # when one of the sanitizers was successfully enabled. This is a good place | |
33 | # to call AC_DEFINE for any precompiler constants you might need to make your | |
34 | # code play nice with sanitizers. | |
35 | # | |
36 | # The variable ax_enabled_sanitizers contains a whitespace-separated list of | |
37 | # all enabled sanitizers, so that you can print them at the end of configure, | |
38 | # if you wish. | |
39 | # | |
40 | # The additional --enable-sanitizers option allows users to enable/disable | |
41 | # all sanitizers, effectively overriding ENABLED-BY-DEFAULT. | |
42 | # | |
43 | # EXAMPLES | |
44 | # | |
45 | # AX_SANITIZERS([address]) | |
46 | # dnl offer users to enable address sanitizer via --enable-address-sanitizer | |
47 | # | |
48 | # is_debug_build=… | |
49 | # if test "x$is_debug_build" = "xyes"; then | |
50 | # default_sanitizers="address memory" | |
51 | # else | |
52 | # default_sanitizers= | |
53 | # fi | |
54 | # AX_SANITIZERS([address memory], [$default_sanitizers]) | |
55 | # dnl enable address sanitizer and memory sanitizer by default for debug | |
56 | # dnl builds, e.g. when building from git instead of a dist tarball. | |
57 | # | |
58 | # AX_SANITIZERS(, , [ | |
59 | # AC_DEFINE([SANITIZERS_ENABLED], | |
60 | # [], | |
61 | # [At least one sanitizer was enabled])]) | |
62 | # dnl enable all sanitizers known to AX_SANITIZERS by default and set the | |
63 | # dnl SANITIZERS_ENABLED precompiler constant. | |
64 | # | |
65 | # AX_SANITIZERS(, [ ]) | |
66 | # dnl provide all sanitizers, but enable none by default. | |
67 | # | |
68 | # LICENSE | |
69 | # | |
70 | # Copyright (c) 2016 Michael Stapelberg <michael@i3wm.org> | |
71 | # | |
72 | # Copying and distribution of this file, with or without modification, | |
73 | # are permitted in any medium without royalty provided the copyright | |
74 | # notice and this notice are preserved. This file is offered as-is, | |
75 | # without any warranty. | |
76 | ||
77 | AC_DEFUN([AX_SANITIZERS], | |
78 | [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) | |
79 | AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) | |
80 | AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) | |
81 | AC_ARG_ENABLE(sanitizers, | |
82 | AS_HELP_STRING( | |
83 | [--enable-sanitizers], | |
84 | [enable all known sanitizers]), | |
85 | [ax_sanitizers_default=$enableval], | |
86 | [ax_sanitizers_default=]) | |
87 | ax_enabled_sanitizers= | |
88 | m4_foreach_w([mysan], m4_default($1, [address memory undefined]), [ | |
89 | dnl If ax_sanitizers_default is unset, i.e. the user neither explicitly | |
90 | dnl enabled nor explicitly disabled all sanitizers, we get the default value | |
91 | dnl for this sanitizer based on whether it is listed in ENABLED-BY-DEFAULT. | |
92 | AS_IF([test "x$ax_sanitizers_default" = "x"], [dnl | |
93 | ax_sanitizer_default= | |
94 | for mycheck in m4_default([$2], [address memory undefined]); do | |
95 | AS_IF([test "x$mycheck" = "x[]mysan"], [ax_sanitizer_default=yes]) | |
96 | done | |
97 | AS_IF([test "x$ax_sanitizer_default" = "x"], [ax_sanitizer_default=no]) | |
98 | ], | |
99 | [ax_sanitizer_default=$ax_sanitizers_default]) | |
100 | AC_ARG_ENABLE(mysan[]-sanitizer, | |
101 | AS_HELP_STRING( | |
102 | [--enable-[]mysan[]-sanitizer], | |
103 | [enable -fsanitize=mysan]), | |
104 | [ax_sanitizer_enabled=$enableval], | |
105 | [ax_sanitizer_enabled=$ax_sanitizer_default]) | |
106 | ||
107 | AS_IF([test "x$ax_sanitizer_enabled" = "xyes"], [ | |
108 | dnl Not using AX_APPEND_COMPILE_FLAGS and AX_APPEND_LINK_FLAGS because they | |
109 | dnl lack the ability to specify ACTION-SUCCESS. | |
110 | AX_CHECK_COMPILE_FLAG([-fsanitize=[]mysan], [ | |
111 | AX_CHECK_LINK_FLAG([-fsanitize=[]mysan], [ | |
112 | AX_APPEND_FLAG([-fsanitize=[]mysan], []) | |
113 | dnl If and only if libtool is being used, LDFLAGS needs to contain -Wc,-fsanitize=…. | |
114 | dnl See e.g. https://sources.debian.net/src/systemd/231-7/configure.ac/?hl=128#L135 | |
115 | dnl TODO: how can recognize that situation and add -Wc,? | |
116 | AX_APPEND_FLAG([-fsanitize=[]mysan], [LDFLAGS]) | |
117 | dnl TODO: add -fPIE -pie for memory | |
118 | # -fno-omit-frame-pointer results in nicer stack traces in error | |
119 | # messages, see http://clang.llvm.org/docs/AddressSanitizer.html#usage | |
120 | AX_CHECK_COMPILE_FLAG([-fno-omit-frame-pointer], [ | |
121 | AX_APPEND_FLAG([-fno-omit-frame-pointer], [])]) | |
122 | dnl TODO: at least for clang, we should specify exactly -O1, not -O2 or -O0, so that performance is reasonable but stacktraces are not tampered with (due to inlining), see http://clang.llvm.org/docs/AddressSanitizer.html#usage | |
123 | m4_default([$3], :) | |
124 | ax_enabled_sanitizers="[]mysan $ax_enabled_sanitizers" | |
125 | ]) | |
126 | ]) | |
127 | ]) | |
128 | ])dnl | |
129 | ])dnl AX_SANITIZERS |
0 | #!/bin/sh | |
1 | ||
2 | set -eu | |
3 | ||
4 | cd "${MESON_DIST_ROOT}" | |
5 | ||
6 | # Delete everything we do not want to have in the release tarballs: | |
7 | rm -rf \ | |
8 | .clang-format \ | |
9 | .editorconfig \ | |
10 | travis \ | |
11 | .github |
0 | # -*- mode: meson -*- | |
1 | ||
2 | # Style objective: be consistent with what mesonbuild.com documents/uses, and/or | |
3 | # the meson book: https://meson-manual.com/ | |
4 | ||
5 | project( | |
6 | 'i3lock', | |
7 | 'c', | |
8 | version: '2.14.1', | |
9 | default_options: [ | |
10 | 'c_std=c11', | |
11 | 'warning_level=1', # enable all warnings (-Wall) | |
12 | # TODO(https://github.com/i3/i3/issues/4087): switch to | |
13 | # 'buildtype=debugoptimized', | |
14 | ], | |
15 | # Ubuntu 18.04 (supported until 2023) has meson 0.45. | |
16 | # We can revisit our minimum supported meson version | |
17 | # if it turns out to be too hard to maintain. | |
18 | meson_version: '>=0.45.0', | |
19 | ) | |
20 | ||
21 | cc = meson.get_compiler('c') | |
22 | add_project_arguments(cc.get_supported_arguments(['-Wunused-value']), language: 'c') | |
23 | ||
24 | if meson.version().version_compare('>=0.48.0') | |
25 | # https://github.com/mesonbuild/meson/issues/2166#issuecomment-629696911 | |
26 | meson.add_dist_script('meson/meson-dist-script') | |
27 | else | |
28 | message('meson <0.48.0 detected, dist tarballs will not be filtered') | |
29 | endif | |
30 | ||
31 | ################################################################################ | |
32 | # Version handling | |
33 | ################################################################################ | |
34 | ||
35 | cdata = configuration_data() | |
36 | ||
37 | version_array = meson.project_version().split('.') | |
38 | cdata.set_quoted('I3LOCK_VERSION', '@VCS_TAG@') | |
39 | cdata.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir'))) | |
40 | ||
41 | if get_option('b_sanitize').split(',').contains('address') | |
42 | cdata.set('I3LOCK_ASAN_ENABLED', 1) | |
43 | endif | |
44 | ||
45 | cdata.set('HAVE_STRNDUP', cc.has_function('strndup')) | |
46 | cdata.set('HAVE_MKDIRP', cc.has_function('mkdirp')) | |
47 | ||
48 | # Instead of generating config.h directly, make vcs_tag generate it so that | |
49 | # @VCS_TAG@ is replaced. | |
50 | config_h_in = configure_file( | |
51 | output: 'config.h.in', | |
52 | configuration: cdata, | |
53 | ) | |
54 | config_h = declare_dependency( | |
55 | sources: vcs_tag( | |
56 | input: config_h_in, | |
57 | output: 'config.h', | |
58 | fallback: meson.project_version(), | |
59 | ) | |
60 | ) | |
61 | ||
62 | ################################################################################ | |
63 | # manpages | |
64 | ################################################################################ | |
65 | ||
66 | install_man('i3lock.1') | |
67 | ||
68 | # Required for e.g. struct ucred to be defined as per unix(7). | |
69 | add_project_arguments('-D_GNU_SOURCE', language: 'c') | |
70 | ||
71 | # https://mesonbuild.com/howtox.html#add-math-library-lm-portably | |
72 | m_dep = cc.find_library('m', required: false) | |
73 | rt_dep = cc.find_library('rt', required: false) | |
74 | ||
75 | xcb_dep = dependency('xcb', method: 'pkg-config') | |
76 | xcb_xkb_dep = dependency('xcb-xkb', method: 'pkg-config') | |
77 | xcb_xinerama_dep = dependency('xcb-xinerama', method: 'pkg-config') | |
78 | xcb_randr_dep = dependency('xcb-randr', method: 'pkg-config') | |
79 | xcb_image_dep = dependency('xcb-image', method: 'pkg-config') | |
80 | xcb_util_dep = dependency('xcb-util', method: 'pkg-config') | |
81 | xcb_util_xrm_dep = dependency('xcb-xrm', method: 'pkg-config') | |
82 | xkbcommon_dep = dependency('xkbcommon', method: 'pkg-config') | |
83 | xkbcommon_x11_dep = dependency('xkbcommon-x11', method: 'pkg-config') | |
84 | cairo_dep = dependency('cairo', version: '>=1.14.4', method: 'pkg-config') | |
85 | ||
86 | i3lock_srcs = [ | |
87 | 'dpi.c', | |
88 | 'i3lock.c', | |
89 | 'randr.c', | |
90 | 'unlock_indicator.c', | |
91 | 'xcb.c', | |
92 | ] | |
93 | ||
94 | ev_dep = cc.find_library('ev') | |
95 | ||
96 | thread_dep = dependency('threads') | |
97 | ||
98 | i3lock_deps = [ | |
99 | thread_dep, | |
100 | m_dep, | |
101 | rt_dep, | |
102 | ev_dep, | |
103 | config_h, | |
104 | cairo_dep, | |
105 | xcb_dep, | |
106 | xcb_xkb_dep, | |
107 | xcb_xinerama_dep, | |
108 | xcb_randr_dep, | |
109 | xcb_image_dep, | |
110 | xcb_util_dep, | |
111 | xcb_util_xrm_dep, | |
112 | xkbcommon_dep, | |
113 | xkbcommon_x11_dep, | |
114 | ] | |
115 | ||
116 | host_os = host_machine.system() | |
117 | if host_os != 'openbsd' | |
118 | pam_dep = cc.find_library('pam', required: true) | |
119 | i3lock_deps += [pam_dep] | |
120 | endif | |
121 | ||
122 | inc = include_directories('include') | |
123 | ||
124 | executable( | |
125 | 'i3lock', | |
126 | i3lock_srcs, | |
127 | install: true, | |
128 | include_directories: inc, | |
129 | dependencies: i3lock_deps, | |
130 | ) | |
131 | ||
132 | install_subdir( | |
133 | 'pam', | |
134 | strip_directory: true, | |
135 | install_dir: join_paths(get_option('sysconfdir'), 'pam.d'), | |
136 | ) |
0 | # -*- mode: meson -*- |
0 | #! /bin/sh | |
1 | # Common wrapper for a few potentially missing GNU programs. | |
2 | ||
3 | scriptversion=2018-03-07.03; # UTC | |
4 | ||
5 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
6 | # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | |
7 | ||
8 | # This program is free software; you can redistribute it and/or modify | |
9 | # it under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2, or (at your option) | |
11 | # any later version. | |
12 | ||
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | ||
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | |
20 | ||
21 | # As a special exception to the GNU General Public License, if you | |
22 | # distribute this file as part of a program that contains a | |
23 | # configuration script generated by Autoconf, you may include it under | |
24 | # the same distribution terms that you use for the rest of that program. | |
25 | ||
26 | if test $# -eq 0; then | |
27 | echo 1>&2 "Try '$0 --help' for more information" | |
28 | exit 1 | |
29 | fi | |
30 | ||
31 | case $1 in | |
32 | ||
33 | --is-lightweight) | |
34 | # Used by our autoconf macros to check whether the available missing | |
35 | # script is modern enough. | |
36 | exit 0 | |
37 | ;; | |
38 | ||
39 | --run) | |
40 | # Back-compat with the calling convention used by older automake. | |
41 | shift | |
42 | ;; | |
43 | ||
44 | -h|--h|--he|--hel|--help) | |
45 | echo "\ | |
46 | $0 [OPTION]... PROGRAM [ARGUMENT]... | |
47 | ||
48 | Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due | |
49 | to PROGRAM being missing or too old. | |
50 | ||
51 | Options: | |
52 | -h, --help display this help and exit | |
53 | -v, --version output version information and exit | |
54 | ||
55 | Supported PROGRAM values: | |
56 | aclocal autoconf autoheader autom4te automake makeinfo | |
57 | bison yacc flex lex help2man | |
58 | ||
59 | Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and | |
60 | 'g' are ignored when checking the name. | |
61 | ||
62 | Send bug reports to <bug-automake@gnu.org>." | |
63 | exit $? | |
64 | ;; | |
65 | ||
66 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | |
67 | echo "missing $scriptversion (GNU Automake)" | |
68 | exit $? | |
69 | ;; | |
70 | ||
71 | -*) | |
72 | echo 1>&2 "$0: unknown '$1' option" | |
73 | echo 1>&2 "Try '$0 --help' for more information" | |
74 | exit 1 | |
75 | ;; | |
76 | ||
77 | esac | |
78 | ||
79 | # Run the given program, remember its exit status. | |
80 | "$@"; st=$? | |
81 | ||
82 | # If it succeeded, we are done. | |
83 | test $st -eq 0 && exit 0 | |
84 | ||
85 | # Also exit now if we it failed (or wasn't found), and '--version' was | |
86 | # passed; such an option is passed most likely to detect whether the | |
87 | # program is present and works. | |
88 | case $2 in --version|--help) exit $st;; esac | |
89 | ||
90 | # Exit code 63 means version mismatch. This often happens when the user | |
91 | # tries to use an ancient version of a tool on a file that requires a | |
92 | # minimum version. | |
93 | if test $st -eq 63; then | |
94 | msg="probably too old" | |
95 | elif test $st -eq 127; then | |
96 | # Program was missing. | |
97 | msg="missing on your system" | |
98 | else | |
99 | # Program was found and executed, but failed. Give up. | |
100 | exit $st | |
101 | fi | |
102 | ||
103 | perl_URL=https://www.perl.org/ | |
104 | flex_URL=https://github.com/westes/flex | |
105 | gnu_software_URL=https://www.gnu.org/software | |
106 | ||
107 | program_details () | |
108 | { | |
109 | case $1 in | |
110 | aclocal|automake) | |
111 | echo "The '$1' program is part of the GNU Automake package:" | |
112 | echo "<$gnu_software_URL/automake>" | |
113 | echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" | |
114 | echo "<$gnu_software_URL/autoconf>" | |
115 | echo "<$gnu_software_URL/m4/>" | |
116 | echo "<$perl_URL>" | |
117 | ;; | |
118 | autoconf|autom4te|autoheader) | |
119 | echo "The '$1' program is part of the GNU Autoconf package:" | |
120 | echo "<$gnu_software_URL/autoconf/>" | |
121 | echo "It also requires GNU m4 and Perl in order to run:" | |
122 | echo "<$gnu_software_URL/m4/>" | |
123 | echo "<$perl_URL>" | |
124 | ;; | |
125 | esac | |
126 | } | |
127 | ||
128 | give_advice () | |
129 | { | |
130 | # Normalize program name to check for. | |
131 | normalized_program=`echo "$1" | sed ' | |
132 | s/^gnu-//; t | |
133 | s/^gnu//; t | |
134 | s/^g//; t'` | |
135 | ||
136 | printf '%s\n' "'$1' is $msg." | |
137 | ||
138 | configure_deps="'configure.ac' or m4 files included by 'configure.ac'" | |
139 | case $normalized_program in | |
140 | autoconf*) | |
141 | echo "You should only need it if you modified 'configure.ac'," | |
142 | echo "or m4 files included by it." | |
143 | program_details 'autoconf' | |
144 | ;; | |
145 | autoheader*) | |
146 | echo "You should only need it if you modified 'acconfig.h' or" | |
147 | echo "$configure_deps." | |
148 | program_details 'autoheader' | |
149 | ;; | |
150 | automake*) | |
151 | echo "You should only need it if you modified 'Makefile.am' or" | |
152 | echo "$configure_deps." | |
153 | program_details 'automake' | |
154 | ;; | |
155 | aclocal*) | |
156 | echo "You should only need it if you modified 'acinclude.m4' or" | |
157 | echo "$configure_deps." | |
158 | program_details 'aclocal' | |
159 | ;; | |
160 | autom4te*) | |
161 | echo "You might have modified some maintainer files that require" | |
162 | echo "the 'autom4te' program to be rebuilt." | |
163 | program_details 'autom4te' | |
164 | ;; | |
165 | bison*|yacc*) | |
166 | echo "You should only need it if you modified a '.y' file." | |
167 | echo "You may want to install the GNU Bison package:" | |
168 | echo "<$gnu_software_URL/bison/>" | |
169 | ;; | |
170 | lex*|flex*) | |
171 | echo "You should only need it if you modified a '.l' file." | |
172 | echo "You may want to install the Fast Lexical Analyzer package:" | |
173 | echo "<$flex_URL>" | |
174 | ;; | |
175 | help2man*) | |
176 | echo "You should only need it if you modified a dependency" \ | |
177 | "of a man page." | |
178 | echo "You may want to install the GNU Help2man package:" | |
179 | echo "<$gnu_software_URL/help2man/>" | |
180 | ;; | |
181 | makeinfo*) | |
182 | echo "You should only need it if you modified a '.texi' file, or" | |
183 | echo "any other file indirectly affecting the aspect of the manual." | |
184 | echo "You might want to install the Texinfo package:" | |
185 | echo "<$gnu_software_URL/texinfo/>" | |
186 | echo "The spurious makeinfo call might also be the consequence of" | |
187 | echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" | |
188 | echo "want to install GNU make:" | |
189 | echo "<$gnu_software_URL/make/>" | |
190 | ;; | |
191 | *) | |
192 | echo "You might have modified some files without having the proper" | |
193 | echo "tools for further handling them. Check the 'README' file, it" | |
194 | echo "often tells you about the needed prerequisites for installing" | |
195 | echo "this package. You may also peek at any GNU archive site, in" | |
196 | echo "case some other package contains this missing '$1' program." | |
197 | ;; | |
198 | esac | |
199 | } | |
200 | ||
201 | give_advice "$1" | sed -e '1s/^/WARNING: /' \ | |
202 | -e '2,$s/^/ /' >&2 | |
203 | ||
204 | # Propagate the correct exit status (expected to be 127 for a program | |
205 | # not found, 63 for a program that failed due to version mismatch). | |
206 | exit $st | |
207 | ||
208 | # Local variables: | |
209 | # eval: (add-hook 'before-save-hook 'time-stamp) | |
210 | # time-stamp-start: "scriptversion=" | |
211 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
212 | # time-stamp-time-zone: "UTC0" | |
213 | # time-stamp-end: "; # UTC" | |
214 | # End: |
0 | #ifndef _XINERAMA_H | |
1 | #define _XINERAMA_H | |
2 | ||
3 | typedef struct Rect { | |
4 | int16_t x; | |
5 | int16_t y; | |
6 | uint16_t width; | |
7 | uint16_t height; | |
8 | } Rect; | |
9 | ||
10 | extern int xr_screens; | |
11 | extern Rect *xr_resolutions; | |
12 | ||
13 | void randr_init(int *event_base, xcb_window_t root); | |
14 | void randr_query(xcb_window_t root); | |
15 | ||
16 | #endif |
11 | 11 | #include <string.h> |
12 | 12 | #include <math.h> |
13 | 13 | #include <xcb/xcb.h> |
14 | #include <xkbcommon/xkbcommon.h> | |
14 | 15 | #include <ev.h> |
15 | 16 | #include <cairo.h> |
16 | 17 | #include <cairo/cairo-xcb.h> |
61 | 62 | /* Number of failed unlock attempts. */ |
62 | 63 | extern int failed_attempts; |
63 | 64 | |
65 | extern struct xkb_keymap *xkb_keymap; | |
66 | extern struct xkb_state *xkb_state; | |
67 | ||
64 | 68 | /******************************************************************************* |
65 | 69 | * Variables defined in xcb.c. |
66 | 70 | ******************************************************************************/ |
79 | 83 | * indicator. */ |
80 | 84 | unlock_state_t unlock_state; |
81 | 85 | auth_state_t auth_state; |
86 | ||
87 | /* check_modifier_keys describes the currently active modifiers (Caps Lock, Alt, | |
88 | Num Lock or Super) in the modifier_string variable. */ | |
89 | static void check_modifier_keys(void) { | |
90 | xkb_mod_index_t idx, num_mods; | |
91 | const char *mod_name; | |
92 | ||
93 | num_mods = xkb_keymap_num_mods(xkb_keymap); | |
94 | ||
95 | for (idx = 0; idx < num_mods; idx++) { | |
96 | if (!xkb_state_mod_index_is_active(xkb_state, idx, XKB_STATE_MODS_EFFECTIVE)) | |
97 | continue; | |
98 | ||
99 | mod_name = xkb_keymap_mod_get_name(xkb_keymap, idx); | |
100 | if (mod_name == NULL) | |
101 | continue; | |
102 | ||
103 | /* Replace certain xkb names with nicer, human-readable ones. */ | |
104 | if (strcmp(mod_name, XKB_MOD_NAME_CAPS) == 0) { | |
105 | mod_name = "Caps Lock"; | |
106 | } else if (strcmp(mod_name, XKB_MOD_NAME_NUM) == 0) { | |
107 | mod_name = "Num Lock"; | |
108 | } else { | |
109 | /* Show only Caps Lock and Num Lock, other modifiers (e.g. Shift) | |
110 | * leak state about the password. */ | |
111 | continue; | |
112 | } | |
113 | ||
114 | char *tmp; | |
115 | if (modifier_string == NULL) { | |
116 | if (asprintf(&tmp, "%s", mod_name) != -1) | |
117 | modifier_string = tmp; | |
118 | } else if (asprintf(&tmp, "%s, %s", modifier_string, mod_name) != -1) { | |
119 | free(modifier_string); | |
120 | modifier_string = tmp; | |
121 | } | |
122 | } | |
123 | } | |
82 | 124 | |
83 | 125 | /* |
84 | 126 | * Draws global image with fill color onto a pixmap with the given |
249 | 291 | cairo_close_path(ctx); |
250 | 292 | } |
251 | 293 | |
252 | if (auth_state == STATE_AUTH_WRONG && (modifier_string != NULL)) { | |
294 | if (modifier_string != NULL) { | |
253 | 295 | cairo_text_extents_t extents; |
254 | 296 | double x, y; |
255 | 297 | |
350 | 392 | */ |
351 | 393 | void redraw_screen(void) { |
352 | 394 | DEBUG("redraw_screen(unlock_state = %d, auth_state = %d)\n", unlock_state, auth_state); |
395 | ||
396 | if (modifier_string) { | |
397 | free(modifier_string); | |
398 | modifier_string = NULL; | |
399 | } | |
400 | check_modifier_keys(); | |
401 | ||
353 | 402 | if (bg_pixmap == XCB_NONE) { |
354 | 403 | DEBUG("allocating pixmap for %d x %d px\n", last_resolution[0], last_resolution[1]); |
355 | 404 | bg_pixmap = create_bg_pixmap(conn, screen, last_resolution, color); |
0 | #ifndef _UNLOCK_INDICATOR_H | |
1 | #define _UNLOCK_INDICATOR_H | |
2 | ||
3 | #include <xcb/xcb.h> | |
4 | ||
5 | typedef enum { | |
6 | STATE_STARTED = 0, /* default state */ | |
7 | STATE_KEY_PRESSED = 1, /* key was pressed, show unlock indicator */ | |
8 | STATE_KEY_ACTIVE = 2, /* a key was pressed recently, highlight part | |
9 | of the unlock indicator. */ | |
10 | STATE_BACKSPACE_ACTIVE = 3, /* backspace was pressed recently, highlight | |
11 | part of the unlock indicator in red. */ | |
12 | STATE_NOTHING_TO_DELETE = 4, /* backspace was pressed, but there is nothing to delete. */ | |
13 | } unlock_state_t; | |
14 | ||
15 | typedef enum { | |
16 | STATE_AUTH_IDLE = 0, /* no authenticator interaction at the moment */ | |
17 | STATE_AUTH_VERIFY = 1, /* currently verifying the password via authenticator */ | |
18 | STATE_AUTH_LOCK = 2, /* currently locking the screen */ | |
19 | STATE_AUTH_WRONG = 3, /* the password was wrong */ | |
20 | STATE_I3LOCK_LOCK_FAILED = 4, /* i3lock failed to load */ | |
21 | } auth_state_t; | |
22 | ||
23 | void free_bg_pixmap(void); | |
24 | void draw_image(xcb_pixmap_t bg_pixmap, uint32_t* resolution); | |
25 | void redraw_screen(void); | |
26 | void clear_indicator(void); | |
27 | ||
28 | #endif |
0 | #ifndef _XCB_H | |
1 | #define _XCB_H | |
2 | ||
3 | #include <xcb/xcb.h> | |
4 | ||
5 | extern xcb_connection_t *conn; | |
6 | extern xcb_screen_t *screen; | |
7 | ||
8 | xcb_visualtype_t *get_root_visual_type(xcb_screen_t *s); | |
9 | xcb_pixmap_t create_bg_pixmap(xcb_connection_t *conn, xcb_screen_t *scr, u_int32_t *resolution, char *color); | |
10 | xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, char *color, xcb_pixmap_t pixmap); | |
11 | bool grab_pointer_and_keyboard(xcb_connection_t *conn, xcb_screen_t *screen, xcb_cursor_t cursor, int tries); | |
12 | xcb_cursor_t create_cursor(xcb_connection_t *conn, xcb_screen_t *screen, xcb_window_t win, int choice); | |
13 | xcb_window_t find_focused_window(xcb_connection_t *conn, const xcb_window_t root); | |
14 | void set_focused_window(xcb_connection_t *conn, const xcb_window_t root, const xcb_window_t window); | |
15 | ||
16 | #endif |