[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Lack of quoting not caught -> bad configure script
From: |
Tim Van Holder |
Subject: |
Lack of quoting not caught -> bad configure script |
Date: |
Fri, 20 Jul 2001 21:15:42 +0200 |
Ran into this with man_db 2.3.18:
it uses
AC_CHECK_FUNC(regcomp, AC_DEFINE(POSIX_REGEX),
AC_CHECK_FUNC(re_comp, AC_DEFINE(BSD_REGEX),
AC_MSG_WARN([blah])))
This does not trigger any warning from autoconf, nor does
it prod autoupdate into action, but it does yield an invalid
configure script:
....
echo "$as_me:8507: checking for regcomp" >&5
echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
if test "${ac_cv_func_regcomp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line 8513 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char regcomp (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char regcomp ();
char (*f) ();
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_regcomp) || defined (__stub___regcomp)
choke me
#else
f = regcomp;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8544: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:8547: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:8550: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:8553: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_regcomp=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_regcomp=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8563: result: $ac_cv_func_regcomp" >&5
echo "${ECHO_T}$ac_cv_func_regcomp" >&6
if test $ac_cv_func_regcomp = yes; then
cat >>confdefs.h <<\EOF
#define POSIX_REGEX 1
EOF
else
echo "$as_me:8571: checking for re_comp" >&5
echo $ECHO_N "checking for re_comp... $ECHO_C" >&6
if test "${ac_cv_func_re_comp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line 8577 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes
fi
echo "$as_me:8582: checking for fnmatch" >&5
echo $ECHO_N "checking for fnmatch... $ECHO_C" >&6
if test "${ac_cv_func_fnmatch+set}" = set; then
....
So the C program for the re_comp check gets truncated, and bash looks
in van for the closing _ACEOF.
Quoting the second AC_CHECK_FUNC helps, but given that there's
no diagnostic from autoconf at all, and that it probably worked in
2.13, I would consider this a regression.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Lack of quoting not caught -> bad configure script,
Tim Van Holder <=