From: W.C.A. Wijngaards Date: Thu, 4 May 2023 09:12:11 +0000 (+0200) Subject: - Fix #885: Error: util/configlexer.c: No such file or directory, X-Git-Tag: release-1.18.0rc1~24^2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=806c3d7330aae9b93c1624c8ed09f60e14288ee0;p=thirdparty%2Funbound.git - Fix #885: Error: util/configlexer.c: No such file or directory, adds error messages explaining to install flex and bison. --- diff --git a/Makefile.in b/Makefile.in index 2f16220d3..74e45bc5e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/config.h.in b/config.h.in index e7a44bf60..2c999d358 100644 --- a/config.h.in +++ b/config.h.in @@ -364,6 +364,9 @@ /* Define if we have LibreSSL */ #undef HAVE_LIBRESSL +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NET_TSTAMP_H + /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R @@ -671,9 +674,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_NET_TSTAMP_H - /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET @@ -1071,39 +1071,39 @@ #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 @@ -1187,7 +1187,7 @@ #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 + + diff --git a/configure b/configure index 491228b54..9c9103734 100755 --- 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 + diff --git a/configure.ac b/configure.ac index fa5ca1018..86b4fbc7d 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/doc/Changelog b/doc/Changelog index 51f285984..74b16d17b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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.