Relax AC_INIT requirements for PACKAGE and VERSION strings again.
[autoconf.git] / tests / base.at
blobac4ab27b185db8fdaa368c86d435a7cec83aab26
1 #                                                       -*- Autotest -*-
3 AT_BANNER([Autoconf base layer.])
5 # Copyright (C) 2000, 2001, 2003, 2005, 2006, 2007, 2008, 2009, 2010
6 # Free Software Foundation, Inc.
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 3 of the License, or
11 # (at your option) any later version.
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.
18 # You should have received a copy of the GNU General Public License
19 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 ## ------------------------------- ##
23 ## AC_REQUIRE: topological sort..  ##
24 ## ------------------------------- ##
26 # Check that dependencies are always properly honored.
28 AT_SETUP([AC_REQUIRE: topological sort])
29 AT_KEYWORDS([m4@&t@_require])
31 AT_DATA([configure.ac],
32 [[define([REQUIRE_AND_CHECK],
33 [AC_REQUIRE([$1])
34 test -z "$m4@&t@_translit([$1], [A-Z], [a-z])" && AS_EXIT(1)])
36 AC_DEFUN([TEST1],
37 [REQUIRE_AND_CHECK([TEST2a])
38 REQUIRE_AND_CHECK([TEST2b])
39 test1=set])
41 AC_DEFUN([TEST2a],
42 [test2a=set])
44 AC_DEFUN([TEST2b],
45 [REQUIRE_AND_CHECK([TEST3])
46 test2b=set])
48 AC_DEFUN([TEST3],
49 [REQUIRE_AND_CHECK([TEST2a])
50 test3=set])
52 AS@&t@_INIT
54 TEST1
55 test -z "$test1" &&
56   AC_MSG_ERROR([\$test1 is empty])
57 AS_EXIT(0)
58 ]])
60 AT_CHECK_AUTOCONF
61 AT_CHECK_CONFIGURE
63 AT_CLEANUP
66 ## --------------------------- ##
67 ## AC_REQUIRE: error message.  ##
68 ## --------------------------- ##
70 # Check that the message mentions AC_DEFUN, not m4_defun.
72 AT_SETUP([AC_REQUIRE: error message])
73 AT_KEYWORDS([m4@&t@_require])
74 AT_DATA([configure.ac],
75 [[AC_REQUIRE([AC_PROG_CC])
76 ]])
78 AT_CHECK_AUTOCONF([], [1], [],
79 [[configure.ac:1: error: AC_REQUIRE(AC_PROG_CC): cannot be used outside of an AC_DEFUN'd macro
80 configure.ac:1: the top level
81 autom4te: m4 failed with exit status: 1
82 ]])
83 AT_CLEANUP
86 ## ----------------------------------------------- ##
87 ## AC_REQUIRE and AC_DEFUN_ONCE: Require, expand.  ##
88 ## ----------------------------------------------- ##
90 AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: [Require, expand]])
91 AT_KEYWORDS([m4@&t@_require m4@&t@_require_once])
93 AT_DATA([configure.ac],
94 [[AC_DEFUN([TEST],
95 [AC_REQUIRE([MULTI_TEST])
96 AC_REQUIRE([SINGLE_TEST])])
98 AC_DEFUN([MULTI_TEST],
99 [multi_test=".$multi_test"])
101 AC_DEFUN_ONCE([SINGLE_TEST],
102 [single_test=".$single_test"])
104 AS@&t@_INIT
106 TEST
107 TEST
108 MULTI_TEST
109 MULTI_TEST
110 SINGLE_TEST
111 SINGLE_TEST
113 case $multi_test:$single_test in
114   ...:. ) AS_EXIT(0);;
115   ...:* ) AC_MSG_ERROR([DEFUN_ONCE is broken]);;
116   *:.   ) AC_MSG_ERROR([DEFUN is broken (Wow, congrats!)]);;
117 esac
120 AT_CHECK_AUTOCONF([], 0, [])
122 AT_CHECK_CONFIGURE
124 AT_CLEANUP
128 ## ----------------------------------------------- ##
129 ## AC_REQUIRE and AC_DEFUN_ONCE: Expand, require.  ##
130 ## ----------------------------------------------- ##
132 AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: [Expand, require]])
133 AT_KEYWORDS([m4@&t@_require m4@&t@_require_once])
135 AT_DATA([configure.ac],
136 [[AC_DEFUN([TEST],
137 [AC_REQUIRE([MULTI_TEST])
138 AC_REQUIRE([SINGLE_TEST])])
140 AC_DEFUN([MULTI_TEST],
141 [multi_test=".$multi_test"])
143 AC_DEFUN_ONCE([SINGLE_TEST],
144 [single_test=".$single_test"])
146 AS@&t@_INIT
148 MULTI_TEST
149 MULTI_TEST
150 SINGLE_TEST
151 SINGLE_TEST
152 TEST
153 TEST
155 case $multi_test:$single_test in
156   ..:. ) AS_EXIT(0);;
157   ..:* ) AC_MSG_ERROR([DEFUN_ONCE is broken]);;
158   *:.  ) AC_MSG_ERROR([DEFUN is broken (Wow, congrats!)]);;
159      * ) AC_MSG_ERROR([received `$multi_test:$single_test']);;
160 esac
163 AT_CHECK_AUTOCONF([], 0, [])
164 AT_CHECK_CONFIGURE
166 AT_CLEANUP
170 ## ------------------------- ##
171 ## AC_REQUIRE & AC_PROVIDE.  ##
172 ## ------------------------- ##
174 AT_SETUP([AC_REQUIRE & AC_PROVIDE])
175 AT_KEYWORDS([m4@&t@_require])
177 AT_DATA([configure.ac],
178 [[AC_DEFUN([TEST],
179 [AC_REQUIRE([INNER_TEST])])
181 AC_DEFUN([INNER_TEST],
182 [inner_test=".$inner_test"])
184 AS@&t@_INIT
186 AC_PROVIDE([INNER_TEST])
187 TEST
189 case $inner_test in
190   "" ) AS_EXIT(0);;
191   *  ) AC_MSG_ERROR([received `$inner_test']);;
192 esac
195 AT_CHECK_AUTOCONF
196 AT_CHECK_CONFIGURE
198 AT_CLEANUP
201 ## -------- ##
202 ## AC_INIT. ##
203 ## -------- ##
205 # Make sure AC_INIT sets PACKAGE_TARNAME properly.
207 AT_SETUP([AC_INIT])
209 AT_DATA([configure.ac],
210 [[AC_INIT([GNU fu], [1.0], [bug-fu@gnu.org])
213 AT_CHECK_AUTOCONF
214 AT_CHECK_CONFIGURE([-q])
216 # Ensure we get the expected definition:
217 AT_CHECK([grep "^PACKAGE_TARNAME='fu'\$" configure], [], [ignore])
219 AT_CLEANUP
222 ## ------------------------------------- ##
223 ## AC_INIT with unusual version strings. ##
224 ## ------------------------------------- ##
226 AT_SETUP([AC_INIT with unusual version strings])
228 AT_DATA([configure.ac],
229 [[AC_INIT([GNU String++ with spaces (foo)],
230           [2.48++ (2010-07-03)], [http://clisp.cons.org/], [clisp])
231 AC_OUTPUT
234 AT_CHECK_AUTOCONF([-Werror])
235 AT_CHECK_CONFIGURE([-q])
236 AT_CHECK_CONFIGURE([--help])
237 AT_CHECK_CONFIGURE([--version])
238 AT_CHECK([./config.status --version], [], [ignore])
240 AT_CLEANUP
243 ## -------------- ##
244 ## AC_COPYRIGHT.  ##
245 ## -------------- ##
247 # Ensure the FSF notice as well as the user-provided one are present
248 # in the head of the testsuite as well as the --version output.
250 AT_SETUP([AC@&t@_COPYRIGHT])
252 AT_DATA([configure.ac],
253 [[AC_INIT([GNU fu], [1.0])
254 AC_COPYRIGHT([[This is just a test notice, not a real one, so let's avoid
255 words that may be matched by scanners for legal things,
256 causing extra work for distributors.
257 Multi-line values should be supported.
261 AT_CHECK_AUTOCONF
262 AT_CHECK_CONFIGURE([--version], [], [stdout])
263 AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore])
264 AT_CHECK([grep 'This is just a test notice' stdout], [], [ignore])
265 AT_CHECK([sed -ne 50q -e '/Copyright/{' -e N -e N -e N -e N -e 's/#//g' ]dnl
266          [    -e 's/\n//g' -e p -e '}' configure ]dnl
267          [  | grep 'Copyright.*Free Software Foundation'],
268          [], [ignore])
269 AT_CHECK([sed 50q configure | grep 'This is just a test notice'], [], [ignore])
271 AT_CLEANUP
274 ## ---------------- ##
275 ## AC_CACHE_CHECK.  ##
276 ## ---------------- ##
278 # Make sure AC_CACHE_CHECK is silent with -q.
279 # Also make sure we warn about cache id's not named with `_cv_'.
281 AT_SETUP([AC_CACHE_CHECK])
282 AT_KEYWORDS([CONFIG_SITE])
284 # Don't let a config.site file affect this test.
285 AS_UNSET([CONFIG_SITE])
287 AT_DATA([configure.ac],
288 [[AC_INIT
289 # m4_define([ac_nothing], [ac_cv_absolutely_nothing])
290 AC_CACHE_CHECK([for nothing],
291                [ac_nothing],
292                [ac_nothing=found])
294 AC_MSG_CHECKING([for some other variable])
295 commands_to_set_it_was_run=false
296 AC_CACHE_VAL([my_cv_variable], [
297 # FOO
298 commands_to_set_it_was_run=true
299 my_cv_variable=true
301 AC_MSG_RESULT([$my_cv_variable])
303 # Ensure that the result is available at this point.
304 if test ${my_cv_variable+set} != set; then
305   AC_MSG_ERROR([AC@&@&t@t@_CACHE_VAL did not ensure that the cache variable was set])
308 # AC_CACHE_SAVE should be enough here, no need for AC_OUTPUT.
309 AC_CACHE_SAVE
312 AT_CHECK_AUTOCONF([], [], [], [stderr])
313 AT_CHECK([grep 'must contain _cv_ to be cached' stderr], [], [ignore])
315 # Do not warn about defines:
316 sed 's/^# m4_define/m4_define/' configure.ac > t
317 mv -f t configure.ac
318 AT_CHECK_AUTOCONF
319 AT_CHECK_CONFIGURE([-q])
321 sed '/m4_define/d; s/ac_nothing/ac_cv_nothing/' configure.ac > t
322 mv -f t configure.ac
323 AT_CHECK_AUTOCONF
324 AT_CHECK_CONFIGURE([-q])
326 # Print a message saying that the result was cached, iff it was cached.
327 AT_CHECK_CONFIGURE([], [], [stdout])
328 AT_CHECK([grep 'cached' stdout], [1])
329 AT_CHECK_CONFIGURE([my_cv_variable='yes it is set'], [], [stdout])
330 AT_CHECK([grep 'cached.*yes it is set' stdout], [], [ignore])
332 # --cache-file is honored and has caching semantics.
333 AT_CHECK_CONFIGURE([--cache-file=foobar.cache], [], [stdout])
334 AT_CHECK([grep 'cached' stdout], [1])
335 AT_CHECK([test ! -f config.cache])
336 AT_CHECK([grep 'my_cv_variable.*true' foobar.cache], [], [ignore])
337 AT_CHECK_CONFIGURE([--cache-file=foobar.cache], [], [stdout])
338 AT_CHECK([grep 'some other variable.*cached.*true' stdout], [], [ignore])
340 # A setting on the command line overrides the cache.
341 AT_CHECK_CONFIGURE([--cache-file=foobar.cache my_cv_variable='override'], [], [stdout])
342 AT_CHECK([grep 'cached.*override' stdout], [], [ignore])
343 AT_CHECK([grep 'my_cv_variable.*override' foobar.cache], [], [ignore])
345 # Values containing braces need special internal treatment.
346 AT_CHECK_CONFIGURE([-C ac_cv_nothing='{' my_cv_variable='contains } brace'],
347                    [], [stdout])
348 AT_CHECK([grep 'ac_cv_nothing.*{' config.cache], [], [ignore])
349 AT_CHECK([grep 'my_cv_variable.*contains } brace' config.cache], [], [ignore])
350 AT_CHECK_CONFIGURE([-C], [], [stdout])
351 AT_CHECK([grep 'nothing.*{' stdout], [], [ignore])
352 AT_CHECK([grep 'some other variable.*contains } brace' stdout], [], [ignore])
353 rm -f config.cache
355 # Diagnose common side-effects that are errors in COMMANDS-TO-SET-IT:
356 sed 's/^# FOO/AC_DEFINE([some-define], [1], [oooh.])/' configure.ac > t
357 mv -f t configure.ac
358 AT_CHECK_AUTOCONF([], [], [], [stderr])
359 AT_CHECK([grep 'suspicious.*AC_DEFINE' stderr], [], [ignore])
361 sed 's/^AC_DEFINE.*/AC_SUBST([some_substitution], [oooh.])/' configure.ac > t
362 mv -f t configure.ac
363 AT_CHECK_AUTOCONF([], [], [], [stderr])
364 AT_CHECK([grep 'suspicious.*AC_SUBST' stderr], [], [ignore])
366 # Ensure the examples from the manual work as intended.
367 # Taken from autoconf.texi:Caching Results
368 AT_DATA([configure.ac],
369 [[AC_INIT
370 AC_DEFUN([AC_SHELL_TRUE],
371 [AC_CACHE_CHECK([whether true(1) works], [my_cv_shell_true_works],
372                 [my_cv_shell_true_works=no
373                  (true) 2>/dev/null && my_cv_shell_true_works=yes
374                  if test "x$my_cv_shell_true_works" = xyes; then
375                    AC_DEFINE([TRUE_WORKS], [1],
376                              [Define if `true(1)' works properly.])
377                  fi])
379 AC_SHELL_TRUE
381 AT_CHECK_AUTOCONF([-Werror], [1], [], [stderr])
382 AT_CHECK([grep 'suspicious.*AC_DEFINE' stderr], [], [ignore])
384 # Taken from autoconf.texi:Caching Results
385 AT_DATA([configure.ac],
386 [[AC_INIT
387 AC_DEFUN([AC_SHELL_TRUE],
388 [AC_CACHE_CHECK([whether true(1) works], [my_cv_shell_true_works],
389                 [my_cv_shell_true_works=no
390                  (true) 2>/dev/null && my_cv_shell_true_works=yes])
391  if test "x$my_cv_shell_true_works" = xyes; then
392    AC_DEFINE([TRUE_WORKS], [1],
393              [Define if `true(1)' works properly.])
394  fi
396 AC_SHELL_TRUE
397 AC_OUTPUT
399 AT_CHECK_AUTOCONF([-Werror])
400 AT_CHECK_CONFIGURE([-C], [], [stdout])
401 AT_CHECK([grep my_cv_shell_true_works config.cache], [], [ignore])
402 AT_CHECK([grep 'true.*works.*yes' stdout], [], [ignore])
404 AT_CHECK_CONFIGURE([--config-cache], [], [stdout])
405 AT_CHECK([grep 'true.*works.*cached.*yes' stdout], [], [ignore])
407 # config.status only pays attention to the cache file with --recheck.
408 AT_CHECK([./config.status], [], [stdout])
409 AT_CHECK([grep cache stdout], [1])
410 AT_CHECK([./config.status --recheck], [], [stdout])
411 AT_CHECK([grep cache stdout], [0], [ignore])
413 # By default, configure uses no cache file, neither loading nor updating it.
414 : > a-stamp-file
415 AT_CHECK_CONFIGURE([], [], [stdout])
416 AT_CHECK([grep cache stdout], [1])
417 AT_CHECK([LC_ALL=C ls -t config.cache a-stamp-file | sed 1q | grep config.cache], [1])
419 # config.site can specify a site-wide cache, accumulating information.
420 # Also test that we don't run afoul of sourcing a file with leading -.
421 AT_DATA([-config.site],
422 [[cache_file=sitecache
424 AT_DATA([sitecache],
425 [[my_cv_some_preset_cache_var=yes
427 CONFIG_SITE=-config.site
428 export CONFIG_SITE
429 AT_CHECK_CONFIGURE
430 AT_CHECK([grep my_cv_some_preset_cache_var sitecache], [], [ignore])
431 AT_CHECK([grep my_cv_shell_true_works sitecache], [], [ignore])
432 AT_CHECK_CONFIGURE([], [], [stdout])
433 AT_CHECK([grep 'whether true.*works.*cached' stdout], [], [ignore])
435 # Check that config cache scripts must be well-formed.
436 AT_DATA([bad.site],
437 [[fi
439 CONFIG_SITE=$PWD/bad.site
440 AT_CHECK_CONFIGURE([], [1], [ignore], [stderr])
441 AT_CHECK([grep 'failed to load site script' stderr], [], [ignore])
443 # However, a missing file is ignored.
444 CONFIG_SITE=./no-such-file
445 AT_CHECK_CONFIGURE
447 AT_CLEANUP
450 ## --------------- ##
451 ## AC_CACHE_LOAD.  ##
452 ## --------------- ##
454 # Test AC_CACHE_LOAD.
456 AT_SETUP([AC_CACHE_LOAD])
458 AT_DATA([configure.ac],
459 [[AC_INIT
460 $some_test_code
461 AC_CACHE_LOAD
462 AC_MSG_NOTICE([some_cv_variable is $some_cv_variable])
463 AC_OUTPUT
465 AT_CHECK_AUTOCONF
466 AS_UNSET([some_test_code])
467 AT_DATA([new-cache],
468 [[some_cv_variable=value-from-new-cache
470 AT_CHECK_CONFIGURE([some_test_code='eval cache_file=new-cache'], [], [stdout])
471 AT_CHECK([grep 'some_cv_variable.*value-from-new-cache' stdout], [], [ignore])
473 AT_CLEANUP
476 ## ---------------- ##
477 ## AC_COMPUTE_INT.  ##
478 ## ---------------- ##
480 # Make sure AC_COMPUTE_INT fails properly.
482 AT_SETUP([AC_COMPUTE_INT])
484 AT_DATA([configure.ac],
485 [[AC_INIT
486 AC_COMPUTE_INT([invalid_expression],
487                [**0**],
488                [],
489                [invalid_expression=failed])
490 test "$invalid_expression" = failed ||
491   AC_MSG_ERROR([**0** evaluated to $invalid_expression instead of failing])
494 AT_CHECK_AUTOCONF
495 AT_CHECK_CONFIGURE
497 AT_CLEANUP
500 ## ---------------- ##
501 ## AC_TRY_COMMAND.  ##
502 ## ---------------- ##
504 AT_SETUP([AC_TRY_COMMAND])
506 AT_DATA([configure.ac],
507 [[AC_INIT
509 if AC_TRY_COMMAND([(echo "The Cat in the Hat";
510                     echo "The Hat in the Cat" >&2) |
511                    grep \^The\ Cat\ in\ the\ Hat\$ >/dev/null]); then
512   :
513 else
514   AC_MSG_ERROR([didn't see the Cat in the Hat])
517 if AC_TRY_COMMAND([(echo "The Cat in the Hat";
518                     echo "The Hat in the Cat" >&2) |
519                    grep \^The\ Hat\ in\ the\ Cat\$ >/dev/null]); then
520   AC_MSG_ERROR([saw the Hat in the Cat])
524 AT_CHECK_AUTOCONF
525 AT_CHECK_CONFIGURE([-q])
527 AT_CLEANUP
530 ## ------------ ##
531 ## Input/Output ##
532 ## ------------ ##
534 AT_SETUP([Input/Output])
536 AT_DATA([configure.ac],
537 [[AC_INIT
538 cat <&AS@&t@_ORIGINAL_STDIN_FD >&AS@&t@_MESSAGE_FD
540 AT_CHECK_AUTOCONF
541 AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure $configure_options | grep -v 'configure: loading site script '],, [Hello
543 AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure $configure_options --silent])
545 AT_CLEANUP
548 ## ------------------- ##
549 ## configure arguments ##
550 ## ------------------- ##
552 AT_SETUP([configure arguments])
554 AT_DATA([configure.ac],
555 [[AC_INIT
556 echo "$@"
559 AT_CHECK_AUTOCONF
560 AT_CHECK_CONFIGURE([FOO=bar --enable-baz --without-zork --silent], [0], [stdout], [ignore])
561 AT_CHECK([grep 'FOO=bar --enable-baz --without-zork --silent' stdout], [0], [ignore], [ignore])
563 dnl check that syntax error is detected
564 AT_CHECK_CONFIGURE([=], [1], [], [ignore], [ignore])
565 AT_CHECK_CONFIGURE([1=2], [1], [], [ignore], [ignore])
567 AT_CLEANUP
570 ## ------------------------------ ##
571 ## AC_ARG_ENABLE and AC_ARG_WITH. ##
572 ## ------------------------------ ##
574 AT_SETUP([AC_ARG_ENABLE and AC_ARG_WITH])
576 AT_DATA_M4SH([configure.ac],
577 [[AC_INIT
578 # Taken from autoconf.texi:Pretty Help Strings.
579 AC_ARG_WITH([foo],
580   [AS_HELP_STRING([--with-foo],
581      [use foo (default is no)])],
582   [use_foo=$withval],
583   [use_foo=no])
584 AC_ARG_WITH([c++],
585   [AS_HELP_STRING([--with-c++],
586      [with c++])],
587   [choice_with=$withval])
588 AC_ARG_ENABLE([c++],
589   [AS_HELP_STRING([--enable-c++],
590      [enable c++])],
591   [choice_enable=$enableval])
592 echo "use_foo: $use_foo"
593 echo "with_c++: $with_c__, $choice_with"
594 echo "enable_c++: $enable_c__, $choice_enable"
597 AT_CHECK_AUTOCONF
598 AT_CHECK_CONFIGURE([--help | grep foo], [0],
599 [[  --with-foo              use foo (default is no)
600 ]], [ignore])
601 AT_CHECK_CONFIGURE([--with-foo=yes --with-c++ --disable-c++],
602   [], [stdout], [ignore])
603 AT_CHECK([grep 'use_foo: yes' stdout], [], [ignore])
604 AT_CHECK([grep 'with_c++: yes, yes' stdout], [], [ignore])
605 AT_CHECK([grep 'enable_c++: no, no' stdout], [], [ignore])
606 AT_CHECK([grep 'unrecognized option' stdout], [1])
607 AT_CHECK_CONFIGURE([--without-foo --with-c++=no --enable-c++=maybe],
608   [], [stdout], [ignore])
609 AT_CHECK([grep 'use_foo: no' stdout], [], [ignore])
610 AT_CHECK([grep 'with_c++: no, no' stdout], [], [ignore])
611 AT_CHECK([grep 'enable_c++: maybe, maybe' stdout], [], [ignore])
612 AT_CHECK([grep 'unrecognized option' stdout], [1])
613 AT_CHECK_CONFIGURE([], [], [stdout], [ignore])
614 AT_CHECK([grep 'use_foo: no' stdout], [], [ignore])
615 AT_CHECK([grep 'with_c++: , $' stdout], [], [ignore])
616 AT_CHECK([grep 'enable_c++: , $' stdout], [], [ignore])
617 AT_CHECK([grep 'unrecognized option' stdout], [1])
619 AT_CLEANUP
622 ## --------------------- ##
623 ## configure directories ##
624 ## --------------------- ##
626 AT_SETUP([configure directories])
628 AT_DATA([foo.in],
629 [[prefix=@prefix@
630 exec_prefix=@exec_prefix@
631 libdir=@libdir@
634 AT_DATA([configure.ac],
635 [[AC_INIT
636 AC_CONFIG_FILES([foo])
637 AC_OUTPUT
640 AT_CHECK_AUTOCONF
641 dnl check that relative paths are rejected
642 AT_CHECK_CONFIGURE([--libdir=.], [1], [ignore], [stderr])
643 AT_CHECK([grep 'expected an absolute directory name for --libdir: \.' stderr],
644          [0], [ignore])
646 dnl check that extra slashes are stripped, and that defaults are not expanded
647 AT_CHECK_CONFIGURE([--prefix=/usr//])
648 AT_CHECK([cat foo], [0], [[prefix=/usr
649 exec_prefix=${prefix}
650 libdir=${exec_prefix}/lib
653 AT_CLEANUP