]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #885: Error: util/configlexer.c: No such file or directory,
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 4 May 2023 09:12:11 +0000 (11:12 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 4 May 2023 09:12:11 +0000 (11:12 +0200)
  adds error messages explaining to install flex and bison.

Makefile.in
config.h.in
configure
configure.ac
doc/Changelog

index 2f16220d3bb7723f3186dd7a15a0865fde1deba5..74e45bc5e75577e86463fa4108569bcb53b91c1a 100644 (file)
@@ -499,6 +499,7 @@ util/configlexer.c:  $(srcdir)/util/configlexer.lex util/configparser.h
                echo "#include \"util/configyyrename.h\"" >> $@ ;\
                $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\
        fi
+       @if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi
 
 util/configparser.c util/configparser.h:  $(srcdir)/util/configparser.y
        @-if test ! -d util; then $(INSTALL) -d util; fi
index e7a44bf60a94bb5c8e0d899a3fc63c4e1feeada4..2c999d3584e88bece45a9bc9522170a87a88cccd 100644 (file)
 /* Define if we have LibreSSL */
 #undef HAVE_LIBRESSL
 
+/* Define to 1 if you have the <linux/net_tstamp.h> header file. */
+#undef HAVE_LINUX_NET_TSTAMP_H
+
 /* Define to 1 if you have the `localtime_r' function. */
 #undef HAVE_LOCALTIME_R
 
 /* Define to 1 if you have the <time.h> header file. */
 #undef HAVE_TIME_H
 
-/* Define to 1 if you have the <linux/net_tstamp.h> header file. */
-#undef HAVE_LINUX_NET_TSTAMP_H
-
 /* Define to 1 if you have the `tzset' function. */
 #undef HAVE_TZSET
 
 
 #if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
 #define _GNU_SOURCE 1
-#endif
+#endif 
 
 #if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
 #define _BSD_SOURCE 1
-#endif
+#endif 
 
 #if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
 #define _DEFAULT_SOURCE 1
-#endif
+#endif 
 
 #if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
 #define __EXTENSIONS__ 1
-#endif
+#endif 
 
 #if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
 #define _POSIX_C_SOURCE 200112
-#endif
+#endif 
 
 #if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
 #define _XOPEN_SOURCE 600
-#endif
+#endif 
 
 #if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
 #define _XOPEN_SOURCE_EXTENDED 1
-#endif
+#endif 
 
 #if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
 #define _ALL_SOURCE 1
-#endif
+#endif 
 
 #if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
 #define _LARGEFILE_SOURCE 1
-#endif
+#endif 
 
 
 
 #endif
 
 
-
 #ifdef HAVE_ATTR_FORMAT
 #  define ATTR_FORMAT(archetype, string_index, first_to_check) \
     __attribute__ ((format (archetype, string_index, first_to_check)))
@@ -1297,7 +1297,7 @@ void* reallocarray(void *ptr, size_t nmemb, size_t size);
 #ifdef HAVE_WINSOCK2_H
 #define FD_SET_T (u_int)
 #else
-#define FD_SET_T
+#define FD_SET_T 
 #endif
 
 
@@ -1452,3 +1452,5 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
 #define UNBOUND_CONTROL_PORT 8953
 /** the version of unbound-control that this software implements */
 #define UNBOUND_CONTROL_VERSION 1
+
+
index 491228b54d8d2dd15ca87d2cdea2624b7da5566f..9c910373481f1c8a5f8c6e61c203d426f394b69c 100755 (executable)
--- a/configure
+++ b/configure
@@ -813,6 +813,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -964,6 +965,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1216,6 +1218,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1353,7 +1364,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1506,6 +1517,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -6599,6 +6611,11 @@ $as_echo "no" >&6; };
        fi
 
 fi
+if test "$LEX" = "" -o "$LEX" = ":"; then
+       if test ! -f util/configlexer.c; then
+               as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5
+       fi
+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.
@@ -6642,6 +6659,11 @@ fi
 done
 test -n "$YACC" || YACC="yacc"
 
+if test "$YACC" = "" -o "$YACC" = ":"; then
+       if test ! -f util/configparser.c; then
+               as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5
+       fi
+fi
 # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -24276,3 +24298,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
+
index fa5ca10188a4faf5300515e03bd7524e566b7148..86b4fbc7dbb833bd69043c771b9e10bfad54f87a 100644 (file)
@@ -389,7 +389,17 @@ fi
 if test "$LEX" != "" -a "$LEX" != ":"; then
 ACX_YYLEX_OPTION
 fi
+if test "$LEX" = "" -o "$LEX" = ":"; then
+       if test ! -f util/configlexer.c; then
+               AC_MSG_ERROR([no lex and no util/configlexer.c: need flex and bison to compile from source repository.])
+       fi
+fi
 AC_PROG_YACC
+if test "$YACC" = "" -o "$YACC" = ":"; then
+       if test ! -f util/configparser.c; then
+               AC_MSG_ERROR([no yacc and no util/configparser.c: need flex and bison to compile from source repository.])
+       fi
+fi
 AC_CHECK_PROG(doxygen, doxygen, doxygen)
 AC_CHECK_TOOL(STRIP, strip)
 ACX_LIBTOOL_C_ONLY
index 51f2859845eb069bae46b255e8b2dc3276122909..74b16d17ba035611091ae9ed35dc24f3f347f189 100644 (file)
@@ -1,3 +1,7 @@
+4 May 2023: Wouter
+       - Fix #885: Error: util/configlexer.c: No such file or directory,
+         adds error messages explaining to install flex and bison.
+
 1 May 2023: George
        - Merge #722 from David 'eqvinox' Lamparter: NAT64 support.
        - For #722: minor fixes, formatting, refactoring.