]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
yylex_destroy configure.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 25 Aug 2009 12:10:24 +0000 (12:10 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 25 Aug 2009 12:10:24 +0000 (12:10 +0000)
git-svn-id: file:///svn/unbound/trunk@1779 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac
doc/Changelog
util/config_file.c

index 982df150d593eaf08bd2a0daca3b25a043394c2d..71c0be2881be483011d5d6035d0138a71ba23327 100644 (file)
 /* Define to 1 if you have the `_beginthreadex' function. */
 #undef HAVE__BEGINTHREADEX
 
+/* if lex has yylex_destroy */
+#undef LEX_HAS_YYLEX_DESTROY
+
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
 #undef LT_OBJDIR
index b3f3559499230abb3c1fe6c89867863112a208ae..74c5f525e2508e9ab1424ca3016ae757f19ac83d 100755 (executable)
--- a/configure
+++ b/configure
@@ -6155,6 +6155,8 @@ if test "$srcdir" != "."; then
        CPPFLAGS="$CPPFLAGS -I$srcdir"
 fi
 
+
+
 for ac_prog in flex lex
 do
   # 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
 
 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
 do
   # 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
   lt_cv_nm_interface="BSD nm"
   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)
   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)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:7271: output\"" >&5)
+  (eval echo "\"\$as_me:7287: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -8473,7 +8489,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # 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
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9840,11 +9856,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -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)
    ac_status=$?
    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
      # The compiler can only warn and ignore the option if not recognized
      # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -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)
    ac_status=$?
    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
      # The compiler can only warn and ignore the option if not recognized
      # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -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)
    ac_status=$?
    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
    then
      # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -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)
    ac_status=$?
    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
    then
      # 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_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13145 "configure"
+#line 13161 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13238,7 +13254,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13241 "configure"
+#line 13257 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 3d1d2c4e342ffd8a925407341cfe0b44d13b58e1..900e4510b387761d2baea9eeea5f3e212da80ed6 100644 (file)
@@ -182,7 +182,16 @@ if test "$srcdir" != "."; then
        CPPFLAGS="$CPPFLAGS -I$srcdir"
 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
+ACX_YYLEX_DESTROY
 AC_PROG_YACC
 AC_CHECK_PROG(doxygen, doxygen, doxygen)
 AC_CHECK_TOOL(STRIP, strip)
index b8e5604e2e9ff68df407b6bef602fa23b61ae03f..50c6c6295c905c35c31c4b1d50e5bae9e97a116c 100644 (file)
@@ -4,6 +4,7 @@
        - autotrust options: add-holddown, del-holddown, keep-missing.
        - autotrust store revoked status of trust points.
        - ctime_r compat definition.
+       - detect yylex_destroy().
 
 24 August 2009: Wouter
        - cleaner memory allocation on exit. autotrust test routines.
index 2ce763905f7011ee11a5c877f1082d02960f7a4f..60e53242a89fbb08ea5a09231cbc38f3d612a43f 100644 (file)
@@ -61,8 +61,10 @@ int ub_c_lex(void);
 int ub_c_wrap(void);
 /** print error with file and line number */
 void ub_c_error(const char *message);
+#ifdef LEX_HAS_YYLEX_DESTROY
 /** remove buffers for parsing and init */
 void ub_c_lex_destroy(void);
+#endif
 
 /** init ports possible for use */
 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);
        ub_c_in = in;
        ub_c_parse();
+#ifdef LEX_HAS_YYLEX_DESTROY
        ub_c_lex_destroy();
+#endif
        fclose(in);
 
        if(cfg_parser->errors != 0) {