yylex_destroy configure.

git-svn-id: file:///svn/unbound/trunk@1779 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2009-08-25 12:10:24 +00:00
parent e89cbd00fa
commit 6770898042
5 changed files with 47 additions and 14 deletions

View file

@ -323,6 +323,9 @@
/* Define to 1 if you have the `_beginthreadex' function. */ /* Define to 1 if you have the `_beginthreadex' function. */
#undef HAVE__BEGINTHREADEX #undef HAVE__BEGINTHREADEX
/* if lex has yylex_destroy */
#undef LEX_HAS_YYLEX_DESTROY
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/ */
#undef LT_OBJDIR #undef LT_OBJDIR

44
configure vendored
View file

@ -6155,6 +6155,8 @@ if test "$srcdir" != "."; then
CPPFLAGS="$CPPFLAGS -I$srcdir" CPPFLAGS="$CPPFLAGS -I$srcdir"
fi fi
for ac_prog in flex lex for ac_prog in flex lex
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
@ -6368,6 +6370,20 @@ fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c rm -f conftest.l $LEX_OUTPUT_ROOT.c
fi fi
{ $as_echo "$as_me:$LINENO: checking for yylex_destroy" >&5
$as_echo_n "checking for yylex_destroy... " >&6; }
if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
cat >>confdefs.h <<\_ACEOF
#define LEX_HAS_YYLEX_DESTROY 1
_ACEOF
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }; fi
for ac_prog in 'bison -y' byacc for ac_prog in 'bison -y' byacc
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
@ -7262,13 +7278,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else else
lt_cv_nm_interface="BSD nm" lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:7265: $ac_compile\"" >&5) (eval echo "\"\$as_me:7281: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err) (eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5 cat conftest.err >&5
(eval echo "\"\$as_me:7268: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval echo "\"\$as_me:7284: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5 cat conftest.err >&5
(eval echo "\"\$as_me:7271: output\"" >&5) (eval echo "\"\$as_me:7287: output\"" >&5)
cat conftest.out >&5 cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin" lt_cv_nm_interface="MS dumpbin"
@ -8473,7 +8489,7 @@ ia64-*-hpux*)
;; ;;
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 8476 "configure"' > conftest.$ac_ext echo '#line 8492 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
@ -9840,11 +9856,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:9843: $lt_compile\"" >&5) (eval echo "\"\$as_me:9859: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:9847: \$? = $ac_status" >&5 echo "$as_me:9863: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -10179,11 +10195,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10182: $lt_compile\"" >&5) (eval echo "\"\$as_me:10198: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:10186: \$? = $ac_status" >&5 echo "$as_me:10202: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@ -10284,11 +10300,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10287: $lt_compile\"" >&5) (eval echo "\"\$as_me:10303: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:10291: \$? = $ac_status" >&5 echo "$as_me:10307: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@ -10339,11 +10355,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:10342: $lt_compile\"" >&5) (eval echo "\"\$as_me:10358: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:10346: \$? = $ac_status" >&5 echo "$as_me:10362: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@ -13142,7 +13158,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 13145 "configure" #line 13161 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -13238,7 +13254,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 13241 "configure" #line 13257 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

View file

@ -182,7 +182,16 @@ if test "$srcdir" != "."; then
CPPFLAGS="$CPPFLAGS -I$srcdir" CPPFLAGS="$CPPFLAGS -I$srcdir"
fi fi
AC_DEFUN([ACX_YYLEX_DESTROY], [
AC_MSG_CHECKING([for yylex_destroy])
if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
AC_DEFINE(LEX_HAS_YYLEX_DESTROY, 1, [if lex has yylex_destroy])
AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no); fi
])
AC_PROG_LEX AC_PROG_LEX
ACX_YYLEX_DESTROY
AC_PROG_YACC AC_PROG_YACC
AC_CHECK_PROG(doxygen, doxygen, doxygen) AC_CHECK_PROG(doxygen, doxygen, doxygen)
AC_CHECK_TOOL(STRIP, strip) AC_CHECK_TOOL(STRIP, strip)

View file

@ -4,6 +4,7 @@
- autotrust options: add-holddown, del-holddown, keep-missing. - autotrust options: add-holddown, del-holddown, keep-missing.
- autotrust store revoked status of trust points. - autotrust store revoked status of trust points.
- ctime_r compat definition. - ctime_r compat definition.
- detect yylex_destroy().
24 August 2009: Wouter 24 August 2009: Wouter
- cleaner memory allocation on exit. autotrust test routines. - cleaner memory allocation on exit. autotrust test routines.

View file

@ -61,8 +61,10 @@ int ub_c_lex(void);
int ub_c_wrap(void); int ub_c_wrap(void);
/** print error with file and line number */ /** print error with file and line number */
void ub_c_error(const char *message); void ub_c_error(const char *message);
#ifdef LEX_HAS_YYLEX_DESTROY
/** remove buffers for parsing and init */ /** remove buffers for parsing and init */
void ub_c_lex_destroy(void); void ub_c_lex_destroy(void);
#endif
/** init ports possible for use */ /** init ports possible for use */
static void init_outgoing_availports(int* array, int num); static void init_outgoing_availports(int* array, int num);
@ -475,7 +477,9 @@ config_read(struct config_file* cfg, const char* filename, const char* chroot)
create_cfg_parser(cfg, fname, chroot); create_cfg_parser(cfg, fname, chroot);
ub_c_in = in; ub_c_in = in;
ub_c_parse(); ub_c_parse();
#ifdef LEX_HAS_YYLEX_DESTROY
ub_c_lex_destroy(); ub_c_lex_destroy();
#endif
fclose(in); fclose(in);
if(cfg_parser->errors != 0) { if(cfg_parser->errors != 0) {